Announcement

Collapse
No announcement yet.

Invalid SQL: UPDATE adminutil SET text = UNIX_TIMESTAMP() WHERE title = 'datastorelock' AND text < UNIX_TIMESTAMP() - 15

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invalid SQL: UPDATE adminutil SET text = UNIX_TIMESTAMP() WHERE title = 'datastorelock' AND text < UNIX_TIMESTAMP() - 15

    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 http://mydomain.com/domains/mydomain....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 version.






    vBulletin hosting from $0.5 monthly

  • #2
    I don't get an error from that query when running it locally. Without the MySQL Error Number, it will be impossible to track down why it is not working on your specific server.

    What version of PHP are you using?

    What happens if you disable all third-party add-on products?

    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      > I don't get an error from that query when running it locally.

      me neither, i ran it via phpmyadmin

      > Without the MySQL Error Number, it will be impossible to track down why it is not working on your specific server.

      i do not know wat i can do about this

      > What version of PHP are you using?

      5.6, but when i switched to 5.3 (which was used on older server were forum worked), there was no change, error continued to happen. I have not cleared any vbulletin cache or vbstore (by disabling plugins) between the php version switches. But i did it before and that not helped.

      > What happens if you disable all third-party add-on products?

      Not sure if enough, but i added following line to includes/config.php
      define('DISABLE_HOOKS', true);
      and then cleaned system cache from within AdminCP/Maintenance section and now NO ERRORS.

      It means some plugin is not happy with the PHP extensions/modules or higher MySQL version (mysqli)?
      vBulletin hosting from $0.5 monthly

      Comment


      • #4
        What version of vBulletin are you using? If you are not using vBulletin 4.2.5, please upgrade to this minimum version.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud customization and demonstration site.
        vBulletin 5 Documentation - Updated every Friday. Report issues here.
        vBulletin 5 API - Full / Mobile
        I am not currently available for vB Messenger Chats.

        Comment


        • #5
          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.
          vBulletin hosting from $0.5 monthly

          Comment


          • #6
            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

            PHP Code:
            Line 507:
            htmlspecialchars($value)

            Changed to

            htmlspecialchars
            ($valueENT_COMPAT ENT_HTML401"ISO-8859-1"
            now quick editor works (for the time being)
            vBulletin hosting from $0.5 monthly

            Comment


            • #7
              I am glad that you were able to find a fix that works for you.
              Translations provided by Google.

              Wayne Luke
              The Rabid Badger - a vBulletin Cloud customization and demonstration site.
              vBulletin 5 Documentation - Updated every Friday. Report issues here.
              vBulletin 5 API - Full / Mobile
              I am not currently available for vB Messenger Chats.

              Comment


              • #8
                Originally posted by Wayne Luke View Post
                I am glad that you were able to find a fix that works for you.
                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
                vBulletin hosting from $0.5 monthly

                Comment


                • #9
                  You can disable the System Cache in vBulletin 4 by turning off the CMS under Plugins & Products -> Product Manager. It is only used for that component of the system. No other system actually uses the Database Cache in vBulletin 4.X. Otherwise, you'll need to empty it periodically to solve your issue. Since vBulletin 4.2.X is end of life, the only other choice at this point is to upgrade to vBulletin 5.5.4.

                  My guess is that your table is getting too large for some reason. maybe you don't run all the scheduled tasks promptly due to a lack of traffic or you're using MyISAM tables which use table locking instead of row locking. If the table is locked and other queries try to use it or delete rows, they will fail.

                  The adminutil table is only used when you perform administrator/moderator permissions. it isn't actually part of the cache or used by regular users. However, if your system is trying to do something with the cache that takes too long (such as the table being locked), then it can affect other queries. This is due to the procedural nature of vBulletin 4.X and not taking advantage of new technologies.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                  vBulletin 5 Documentation - Updated every Friday. Report issues here.
                  vBulletin 5 API - Full / Mobile
                  I am not currently available for vB Messenger Chats.

                  Comment


                  • #10
                    Originally posted by Wayne Luke View Post
                    ...
                    Thank you alot for your skilled response.

                    > You can disable the System Cache in vBulletin 4 by turning off the CMS
                    admincp/plugin.php?do=modify (Product : vBulletin CMS - all parts of it are strike out)
                    admincp/plugin.php?do=product ("vBulletin CMS4.2.0Content Management System" - it is strike out (i asume Disabled)

                    > you'll need to empty it periodically to solve your issue
                    you mean adminutil mysql table using some external php script that i run like every minute via cronjob? https://duckduckgo.com/?q=php+script+empty+table

                    > My guess is that your table is getting too large for some reaso
                    My adminutil has 8 rows, 490kB ...

                    > maybe you don't run all the scheduled tasks promptly due to a lack of traffic
                    i never run any scheduled tasks manualy, traffic is at least 100 unique visitors daily.. Should i check any particular scheduled task?

                    > or you're using MyISAM tables which use table locking instead of row locking
                    yes, tables seems to be MyISAM. Should i convert it to innoDB? How? I seen your other post where you write: "INNODB will give better performance on newer versions of MySQL. It is the recommended file type for all tables except those which have fulltext indexes on them."

                    > The adminutil table is only used when you perform administrator/moderator permissions.
                    Yes, it happen to me when i edit post as admin, but the error (mentoned in first post) also happened for other non admin/non-mod users and also upon just visiting an archive page.

                    > However, if your system is trying to do something with the cache that takes too long (such as the table being locked)
                    the post is edited OK, jsut the quick editor do not complete. (wheel next to the Save button turning and editor not disappear).

                    - - -
                    So my hope is you mention how to disable that cache as you mentioned or how to periodicaly and automaticaly empty adminutil (table) or other steps to take that may help?






                    vBulletin hosting from $0.5 monthly

                    Comment


                    • #11
                      Your best bet would most be to convert to InnoDB.

                      Start here: https://forum.vbulletin.com/blogs/ibxanders/3935816-

                      Finish the series:
                      https://forum.vbulletin.com/blogs/ibxanders/3935819-
                      https://forum.vbulletin.com/blogs/ibxanders/3935820-
                      https://forum.vbulletin.com/blogs/ibxanders/3935821-
                      https://forum.vbulletin.com/blogs/ibxanders/3935822-
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                      vBulletin 5 Documentation - Updated every Friday. Report issues here.
                      vBulletin 5 API - Full / Mobile
                      I am not currently available for vB Messenger Chats.

                      Comment


                      • #12
                        Originally posted by Wayne Luke View Post
                        convert to InnoDB.
                        I do not want to go this path as we do not know if this issue is caused by table locking. My other vB 4.x forum running on PHP 5.6 and also MyISAM tables + has higher activity and post count and similar plugins does NOT have this issue.
                        I read from your links that the fulltext search would stop working on InnoDB and i would need to use some third party plugin. Spinx search cost $150 and that is not affordable for me. We do not know if table locking is the issue. I can check tables statuses when the issue reappear and if i do not see any locked table, it means locking is not the cause? (the issue rather looks more persistent not that in one second happen and in another not) Please do you have any ideas other than MySQL table type conversion in regards to my previous comment in this thread? Thank you for your feedback
                        Last edited by postcd; Today, 3:42am.
                        vBulletin hosting from $0.5 monthly

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X