Fatal Error When Pulling Up Site
Permalink
I have some Concrete sites hosted on a Virtual Dedicated Server at Godaddy and the server went down. I had them do a reboot of the server and all the sites began working again except for one of them. When I try to pull up the site I get the following error:
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1062: Duplicate entry '17732' for key 1] in EXECUTE("insert into PageStatistics (cID, uID, date) values ('1', 0, NOW())") ' in /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1062, 'Duplicate entry...', 'insert into Pag...', false, Object(ADODB_mysql)) #1 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(998): ADOConnection->_Execute('insert into Pag...') #2 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(766): ADOConnection->Execute('insert into Pag...', Array) #3 [internal function]: ADOConnection->Query('insert into Pag...', Array) #4 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/database.php(73): call_user_func_array(Array, Array) #5 [internal function]: Data in /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1062: Duplicate entry '17732' for key 1] in EXECUTE("insert into PageStatistics (cID, uID, date) values ('1', 0, NOW())") ' in /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(1042): adodb_throw('mysql', 'EXECUTE', 1062, 'Duplicate entry...', 'insert into Pag...', false, Object(ADODB_mysql)) #1 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(998): ADOConnection->_Execute('insert into Pag...') #2 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb.inc.php(766): ADOConnection->Execute('insert into Pag...', Array) #3 [internal function]: ADOConnection->Query('insert into Pag...', Array) #4 /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/database.php(73): call_user_func_array(Array, Array) #5 [internal function]: Data in /var/www/vhosts/aasafe.com/httpdocs/cms/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78
I was able to replicate your error. The way I recreated it was to turn off auto increment on the pstID field in the PageStatistics table. This leads me to believe that there is something wrong with that row in your DB and auto increment is reading like the last pstID entered is 17731 when really it is 17732.
I am not to sure that this is the appropriate way to handle this but here is a what I would try.
I hope that helps.
I am not to sure that this is the appropriate way to handle this but here is a what I would try.
DELETE FROM PageStatistics WHERE pstID = 17732
I hope that helps.
Thanks for your help. I ran a repair operation on the table PageStatistics and it fixed the problem.
Great. That was probably the better solution. :)
How do I do that?
Can you please give me a step by step explanation?
I'm a graphic designer and can't get most of what you guys write in this forum.
I can't access my dashboard due to this error...
Help please
Can you please give me a step by step explanation?
I'm a graphic designer and can't get most of what you guys write in this forum.
I can't access my dashboard due to this error...
Help please
http://www.concrete5.org/community/forums/chat/adodb_exception-dupl...
That might help you solve this.