View Full Version : Invalid SQL: UPDATE adminutil SET text = UNIX_TIMESTAMP() WHERE title ...
postcd
09-26-2019, 10:50 AM
Hello,
this is the error i am getting:
Database error in vBulletin 4.2.0:
Invalid SQL:
UPDATE adminutil SET
text = UNIX_TIMESTAMP()
WHERE title = 'datastorelock' AND text < UNIX_TIMESTAMP() - 15;
MySQL Error :
Error Number :
Request Date : Thursday, September 26th 2019 @ 05:30:03 AM
Error Date : Thursday, September 26th 2019 @ 05:30:04 AM
Script : http://mydomain.com/domains/mydomain...t&postid=25527
Referrer : https://mydomain.com/domains/mydomai...t&postid=25527
IP Address : 172.69.60.131
Username : Admin
Classname : vB_Database_MySQLi
MySQL Version :
I am getting same invalid SQL error also on other pages like mydomain.com/domains/mydomain.com/public_html/archive/index.php/f-20.html
It happening since the hosting account was transferred to a new server with higher MySQL version and higher PHP version. I also changed mysql to mysqli in config.php file if i am not wrong.
What should i try please? I want to stay on current vB version.
Based on the error you pasted here, you are still running vBulletin 4.2.0. If you need to run vBulletin 4 with PHP 7+, you must upgrade to the latest vBulletin 4 version.
postcd
09-27-2019, 08:40 PM
I have disabled and then enabled following plugins:
Helpful Answers
DragonByte Tech: Advanced Post Thanks / Like (Lite)
In AdminCP/Maintenance menu cleared cache.
I no longer have that problem.
postcd
10-01-2019, 10:26 AM
No, it is back. I think it may has to do with the quick edit'or (when i go to advanced editting, then no problem), but when i try to submit quick edit, then the submit button wheel is turning and nothing happens (post was editted on background, but i received that mentioned SQL error - SQL command is OK when executed via PHPmyadmin)
I also had an idea if this is caused by the cloudflare. No it is not. Browser dev. console shown some FAIL: deltype_hard and when i duck.com it, i found [this post](https://forum.vbulletin.com/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/411631-after-upgraded-to-php-5-4-3-the-textarea-is-empty-if-i-want-to-edit-posts-or-threads?p=3548501#post3548501) where is described change in /vb/ckeditor.php
Line 507:
htmlspecialchars($value)
Changed to
htmlspecialchars($value, ENT_COMPAT | ENT_HTML401, "ISO-8859-1")
now quick editor works (for the time being) and no SQL error mail ��
postcd
10-09-2019, 06:14 AM
No, that was not the fix.
Issue is there, but when i go to vbulletin adminCP, Maintenance section, Clear system cache. Then it fix the problem temporarily - Quick editor completing editting and no error. But maybe 24 hours later quick editor will not complete - Save button wheel is turning and editor not close. (post text change is saved on the background without problem).
Any idea why the problem is in System cache. and how to disable it, what to try? Thanks
snakes1100
10-09-2019, 06:46 AM
Upgrade as Dave stated.
What version of MySQL is the new server running, it stated right in the AdminCP home page?
postcd
10-09-2019, 06:52 AM
What version of MySQL is the new server running
Newer than one the forum worked on.
currently it is: "MySQL Version 5.7.27"
snakes1100
10-09-2019, 07:13 AM
What version of php?
postcd
10-09-2019, 03:11 PM
What version of php?
Hosting gives an option to use various PHP versions, so while it was not working on 5.6 i switched to 5.3 which i used on previous server where there was no problem..
snakes1100
10-10-2019, 06:51 AM
Ok, as Dave already stated & myself, you need to upgrade vbulletin to 4.2.5
postcd
10-11-2019, 09:07 PM
> upgrade vbulletin to 4.2.5
I was thinking why. because 4.2.0 worked on previous server so i would think version is not the cause. But i spend my time to upgrade to 4.2.5, but that NOT helped. Same error.
Do you get any other errors at the same time? Check server error logs.
The db error that you have posted in OP does not give any error information.
postcd
10-12-2019, 07:13 AM
@iA1
thank you. I enabled debug mode (https://vborg.vbsupport.ru/showthread.php?t=82835)
and visited the page that is reported having the error mentioned in the first post of this topic. This one:
http://mydomain.com/domains/mydomain.com/public_html/archive/index.php/f-43.html
(note that after move to a new server, site started showing bad URL in adress bar as seen above, but that is possibly another issue not related)
i am then redirected to:
http://mydomain.com/domains/mydomain.com/public_html/sitemap/f-43.html
where is the mentioned SQL error and thanks to debug mode, i see something more:
Stack Trace:
#0 vB_Database->halt() called in [path]/includes/class_core.php on line 1400
#1 vB_Database_MySQLi->execute_query() called in [path]/includes/class_core.php on line 445
#2 vB_Database->query_write() called in [path]/includes/class_datastore.php on line 725
#3 vB_Datastore_Filecache->lock() called in [path]/includes/class_datastore.php on line 640
#4 vB_Datastore_Filecache->build() called in [path]/vbseo/includes/functions_vbseo_startup.php on line 215
#5 vbseo_set_datastore() called in [path]/vbseo/includes/functions_vbseo_startup.php on line 188
#6 vbseo_update_datastore() called in [path]/vbseo/includes/functions_vbseo_startup.php on line 180
#7 vbseo_check_datastore() called in [path]/vbseo/includes/functions_vbseo_vb.php on line 1224
#8 vbseo_get_forum_info() called in [path]/vbseo/includes/functions_vbseo.php on line 1343
#9 make_crawlable() called in [path]/vbseo.php on line 183
when i reloaded page, it shows without issue (so this looks like a random issue?). As you suggested i also looked after error_log file, but there was none in the sites root directory. But hosting control panel has access to error log and found errors like here (https://privatebin.net/?8d6e9f88e6983955#D83R5Hq4By47Rv532k18NQTeB2yKCn2N rP28frx6dYZR).
If you're running vbseo, I highly doubt it's compatible with PHP 7 (because it hasn't been updated for many years) which is why it's throwing those errors.
postcd
10-20-2019, 11:24 AM
My URLs was shows wrong: http://mydomain.com/domains/mydomain.com/public_html/archive/index.php/f-20.html and that i should fix it first.
I ended up enabling vbseo plugin, going to admincp, vbseo, Settings, Options, Advanced settings and set DocRoot path there to be /home/myusername/domains/mydomain.com/public_html
Now URLs show up right and a few days i seen no MySQL error :erm: i think these URL things can also relate to .htaccess. I will report back if the issue re-appear..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.