<![CDATA[ MODx and MySQL Upgrade Problems: Losing auto_increment - My Forums]]> https://forums.modx.com/thread/?thread=7709 <![CDATA[Re: MODx and MySQL Upgrade Problems: Losing auto_increment]]> https://forums.modx.com/thread/7709/modx-and-mysql-upgrade-problems-losing-auto-increment#dis-post-46437 Quote from: devtrench at Jul 13, 2007, 03:04 AM

Also, has anyone ever heard of this happening before??
James, I’ve seen this when exporting data from newer MySQL servers and trying to load it on old ones (i.e. pre-4.0), but I’ve never heard of this happen because of an upgrade to the server. Sounds like the host just did not pay close enough attention to what they were doing.]]>
opengeek Jul 13, 2007, 08:44 AM https://forums.modx.com/thread/7709/modx-and-mysql-upgrade-problems-losing-auto-increment#dis-post-46437
<![CDATA[MODx and MySQL Upgrade Problems: Losing auto_increment]]> https://forums.modx.com/thread/7709/modx-and-mysql-upgrade-problems-losing-auto-increment#dis-post-46436
I got a call from my client saying that their website was down and that she’d called the host and they said they upgraded things. I called the host and they said they just upgraded their web server with the latest version of php (5.2.3) and latest version of MySQL (5.0.27).

So with this information I logged into my client’s plesk control panel and found this error message in the error log:

[Thu Jul 12 10:59:18 2007] [error] [client 1.1.1.1] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 7527027 bytes) in /var/www/vhosts/.../httpdocs/manager/includes/document.parser.class.inc.php on line 1287


I immediately searched the forums for this error message and found others have had similar problems and were able to solve it with an upgrade to 0.9.6. I upgraded with no success on the front end (still just showed a blank page - php errors are off, and logged to the error_log), but I could access the manager. In the manager I kept getting ’Duplicate key 0 for 1’, and "Error updating error log" messages. So when looking at the modx_error_log table in the database I noticed that the ’id’ field didn’t have auto_increment on. Then I looked at the other tables in the database, and NONE of them had auto_increment turned on for the ’id’ fields!! I couldn’t believe it. Going back and looking at the backup I made before I upgraded confirmed that this was messed up before the upgrade to 0.9.6. So somehow, auto_increment got removed from all fields where it was set when the host upgraded MySQL (at least that’s what I think happened).

This was such a perplexing problem for me and took over 8 hours to solve. I hope this helps someone else if they have the same problem, but moreover I hope this was an isolated incident.

Also, has anyone ever heard of this happening before??

Thanks,

James]]>
jamesehly Jul 12, 2007, 10:04 PM https://forums.modx.com/thread/7709/modx-and-mysql-upgrade-problems-losing-auto-increment#dis-post-46436