MyBB Community Forums

Full Version: SQL Error:1064
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One of my members has reported issues logging in; we recently migrated to a new host but he has since logged in and posted (before reporting this issue).  No other member has reported the same issue, and as the error notes "uid" I wondered if it is related to the user

I have yet to hear if this was a temporary issue or if they can now log in, but posting here just to see what the error might be if it is related to the recent migration and if I need to do anything?

MyBB SQL ErrorMyBB has experienced an internal SQL error and cannot continue.

SQL Error:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '34'' at line 1Query:SELECT COUNT(*) as 'unique' FROM mybb_ip_history WHERE IP='V��'' AND uid='34'Please contact the MyBB Group for technical support.
If this IP value seen in your post is exactly that what caused the error, then it seems to be an issue with encoding.

Do you have direct access to the database (PHPMyAdmin, adminer.php etc.)? Then first of all, check the table mybb_ip_history for more such corrupted values. In single cases, you can edit these values manually to prevent future errors.

Hopefully it is no general encoding mismatch after migrating to the new server.

[ExiTuS]
Thanks, ExiTuS - I'm just going to move on as there have been some developments

Since the first member reported this issue a different member on a different forum (still myBB) has reported the same issue.  This forum hasn't been migrated and is hosted on by a completely different host

So I'm now pretty sure this is connected to the recent 1.8.22 update which has been applied to both forums.  I hope one of the forum staff can take a quick glance at this post to provide opinions

I'm concerned that members may be having issues accessing the 2 forums

After the member raised the issue one of my other Admins noted the following

Quote:I've checked some logs and it's not definitive but there may be a variance in the way the MyBB software stores IP addresses (more accommodating of the longer IPv6 addresses by the looks of it) since the recent software update

If you still get the issue you could try disabling IPv6 on your device - see option 2 here: https://www.tenforums.com/tutorials/9003...ndows.html

That member did just that, and it resolved the issue for that user, but I'm not sure how this issue will affect the entire member base
It seems the malformed query is generated by the plugin.
Is the table structure for the field in mybb_ip_history the same as the fields where ip is stored in core mybb tables?

And, does the plugin strictly use core functions when handling ip addresses, or a combination of plugin and core functions?
Thanks, HLFadmin - completely missed that mybb_ip_history is related to a plugin (User IP History Logs)

I will move this convo to the plugin thread to see what the plugin author says