Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 Sep 2019, 13:50
postcd postcd is offline
 
Join Date: Feb 2012
Question Invalid SQL: UPDATE adminutil SET text = UNIX_TIMESTAMP() WHERE title ...

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.
Reply With Quote
  #2  
Old 26 Sep 2019, 21:00
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
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.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 27 Sep 2019, 23:40
postcd postcd is offline
 
Join Date: Feb 2012
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.
Reply With Quote
  #4  
Old 01 Oct 2019, 13:26
postcd postcd is offline
 
Join Date: Feb 2012
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 ��
Reply With Quote
  #5  
Old 09 Oct 2019, 09:14
postcd postcd is offline
 
Join Date: Feb 2012
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
Reply With Quote
  #6  
Old 09 Oct 2019, 09:46
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Real name: Anthony
Upgrade as Dave stated.

What version of MySQL is the new server running, it stated right in the AdminCP home page?
Reply With Quote
  #7  
Old 09 Oct 2019, 09:52
postcd postcd is offline
 
Join Date: Feb 2012
Originally Posted by snakes1100 View Post
What version of MySQL is the new server running
Newer than one the forum worked on.
currently it is: "MySQL Version 5.7.27"
Reply With Quote
  #8  
Old 09 Oct 2019, 10:13
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Real name: Anthony
What version of php?
Reply With Quote
  #9  
Old 09 Oct 2019, 18:11
postcd postcd is offline
 
Join Date: Feb 2012
Originally Posted by snakes1100 View Post
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..
Reply With Quote
  #10  
Old 10 Oct 2019, 09:51
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Real name: Anthony
Ok, as Dave already stated & myself, you need to upgrade vbulletin to 4.2.5
Reply With Quote
  #11  
Old 12 Oct 2019, 00:07
postcd postcd is offline
 
Join Date: Feb 2012
> 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.
Reply With Quote
  #12  
Old 12 Oct 2019, 04:35
iA1 iA1 is offline
 
Join Date: Jul 2018
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.
__________________
Make your forum mobile friendly and get app-like features:
App-like icon on your smartphone homescreen
Responsive style - for vBulletin 4.2.x as well as vB 3.8.x - Contact for custom work
Push notifications for new replies, likes and PM
Reply With Quote
  #13  
Old 12 Oct 2019, 10:13
postcd postcd is offline
 
Join Date: Feb 2012
@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.
Reply With Quote
  #14  
Old 12 Oct 2019, 14:21
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
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.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #15  
Old 20 Oct 2019, 14:24
postcd postcd is offline
 
Join Date: Feb 2012
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 i think these URL things can also relate to .htaccess. I will report back if the issue re-appear..
Reply With Quote
Reply


Tags
mysql


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:34.

Layout Options | Width: Wide Color: