vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=327560

Invalid SQL: UPDATE adminutil SET text = UNIX_TIMESTAMP() WHERE title ...
by postcd
26 Sep 2019 13:50

Hello,

this is the error i am getting:

Quote:

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.

Dave 26 Sep 2019 21:00

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 27 Sep 2019 23:40

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 01 Oct 2019 13:26

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/vb...01#post3548501) where is described change in /vb/ckeditor.php


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

now quick editor works (for the time being) and no SQL error mail ��

postcd 09 Oct 2019 09:14

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 09 Oct 2019 09:46

Upgrade as Dave stated.

What version of MySQL is the new server running, it stated right in the AdminCP home page?

postcd 09 Oct 2019 09:52

Quote:

Originally Posted by snakes1100 (Post 2600907)
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 09 Oct 2019 10:13

What version of php?

postcd 09 Oct 2019 18:11

Quote:

Originally Posted by snakes1100 (Post 2600909)
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 Oct 2019 09:51

Ok, as Dave already stated & myself, you need to upgrade vbulletin to 4.2.5

postcd 12 Oct 2019 00:07

> 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.

iA1 12 Oct 2019 04:35

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 12 Oct 2019 10:13

@iA1

thank you. I enabled debug mode

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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.

Dave 12 Oct 2019 14:21

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 20 Oct 2019 14:24

My URLs was shows wrong: http://mydomain.com/domains/mydomain....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..


All times are GMT. The time now is 19:23.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.