View Full Version : Database Error (when trying to post)
Elizabeth_1977
11-23-2015, 08:25 PM
How do I get rid of this?
I started getting it after I added the following plugin:
https://vborg.vbsupport.ru/showthread.php?t=320877
That plugin shouldn't be the cause of it.
Could you post the full error you're receiving in that yellow area here?
Elizabeth_1977
11-23-2015, 08:33 PM
It was fine prior to that. I had already posted twice without a problem.
I tried to copy the text in the yellow box, but it just wouldn't let me for some strange reason.
squidsk
11-23-2015, 08:43 PM
Right click on the page and click view page source then find the error message and copy it to here.
Elizabeth_1977
11-23-2015, 08:46 PM
Got it:
Database error in vBulletin 4.2.3:
Invalid SQL:
INSERT INTO vbpostlog
(postid, useragent, ip, dateline)
VALUES
(6, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0', 1289670912, 1448318724);
MySQL Error : Duplicate entry '6' for key 'PRIMARY'
Error Number : 1062
Request Date : Monday, November 23rd 2015 @ 04:45:24 PM
Error Date : Monday, November 23rd 2015 @ 04:45:25 PM
Script : http://www.woofster.net/newthread.php?do=postthread&f=70
Referrer : http://www.woofster.net/newthread.php?do=newthread&f=70
IP Address : 76.222.209.0
Username : Elizabeth
Classname : vB_Database_MySQLi
MySQL Version : 5.5.44-37.3-log
Dragonsys
11-23-2015, 08:54 PM
that plugin wouldn't cause that error. Try completely refreshing the page and then post again. Looks like you have a "stuck" post in your browser cache, since the Primary Key (which should be auto generated by the DB) is complaining about being Duplicate.
Elizabeth_1977
11-23-2015, 08:56 PM
Actually, I had to switch browsers to copy and paste that here because it wouldn't copy in IE. So, I used Firefox to do it.
That said, it happens regardless of what browser is used. I tried clearing things but I still get this.
Dragonsys
11-23-2015, 09:01 PM
well, the plugin shouldn't cause the issue, but just to test, disable that plugin and try posting again.
Elizabeth_1977
11-23-2015, 09:10 PM
Done. Still getting the error:
Database error in vBulletin 4.2.3:
Invalid SQL:
INSERT INTO vbpostlog
(postid, useragent, ip, dateline)
VALUES
(7, 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; yie11; rv:11.0) like Gecko', 1289670912, 1448320134);
MySQL Error : Duplicate entry '7' for key 'PRIMARY'
Error Number : 1062
Request Date : Monday, November 23rd 2015 @ 05:08:54 PM
Error Date : Monday, November 23rd 2015 @ 05:08:54 PM
Script : http://www.woofster.net/newthread.php?do=postthread&f=112
Referrer : http://www.woofster.net/newthread.php?do=newthread&f=112
IP Address : 76.222.209.0
Username : Elizabeth
Classname : vB_Database_MySQLi
Elizabeth_1977
11-23-2015, 09:17 PM
Does anyone have any thoughts or suggestions as to what's going on and how to fix it?
Dragonsys
11-23-2015, 11:59 PM
ok, that means it is not that plugin. Try disabling all hooks and see if the error still occurs.
in config.php add the following on the 2nd line:
define('DISABLE_HOOKS', true);
Elizabeth_1977
11-24-2015, 12:57 AM
I searched this forum and the vBulletin support forum to see if others had this issue and how it was handled or fixed.
I went into pphMyAdmin and emptied the table (truncated) vbpostlog. That fixed the issue.
Paul M
11-24-2015, 11:13 AM
Run a MySQL repair on the 'vbpostlog' table.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.