Dec 04, 2008, 03:20 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Read what MODx Developers say: MODx Dev. Blogs
Pages: [1]   Go Down
  Print  
Author Topic: MODx and MySQL Upgrade Problems: Losing auto_increment  (Read 857 times)
0 Members and 1 Guest are viewing this topic.
devtrench
Member
**
Posts: 51



WWW
« on: Jul 12, 2007, 10:04 PM »

I just wanted to post this in case anyone else has or will have this problem.

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:

Code:
[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
Logged

OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,055


looking a little more like my avatar again...


WWW
« Reply #1 on: Jul 13, 2007, 08:44 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.
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
The spirit of a warrior is not geared to indulging and complaining, nor is it geared to winning or losing. The spirit of the warrior is geared only to struggle, and every struggle is a warrior's last battle on earth. Thus the outcome matters very little to him. In his last battle on earth a warrior lets his spirit flow free and clear. And as he wages his battle, knowing that his intent is impeccable, a warrior laughs and laughs.
  — don Juan Matus
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!