mysql error in cron.php, not sure what this could mean?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sross
    Senior Member
    • Mar 2004
    • 660

    mysql error in cron.php, not sure what this could mean?

    Anyone seen anything like this? I get it every day, is it something to worry about? Thanks

    Code:
    Database error in vBulletin 3.6.1:
    
    Invalid SQL:
    
                                            DELETE FROM access
                                            WHERE forumid IN (N;) AND
                                                    userid = 204;
    
    MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';) AND
                                                    userid = 204' at line 2
    Error Number : 1064
    Date         : Sunday, October 22nd 2006 @ 12:02:12 AM
    Script       : [URL="http://www.apug.org/forums/cron.php?&rand=103484"]http://www.mysite.org/forums/cron.php?&rand=103484[/URL]
    Referrer     : [URL="http://www.apug.org/forums/forumdisplay.php?f=65&page=5&order=desc"]http://www.mysite.org/forums/forumdisplay.php?f=65&page=5&order=desc[/URL]
    IP Address   : [URL="http://74.67.77.64/"]00.00.00.00[/URL]
    Username     : Unregistered
    Classname    : vb_database
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    SQL Syntax errors are almost always related to modified code. To troubleshoot this, the first thing you need to do is remove any hacks or plugins, then see if you still have this problem.

    If so, reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server.

    Next, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it. Do you have the same problem?
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • sross
      Senior Member
      • Mar 2004
      • 660

      #3
      ok keeps happening and i wonder if i have a lead. it says user id= 204 but i checked and i have no user for 204 my counts go 202, 203, 205 so at some stage 204 must have been deleted. Maybe it has not been deleted properly? the error is always related to this ghost user..

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Did you follow my instructions?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • sross
          Senior Member
          • Mar 2004
          • 660

          #5
          I wish i could but i have 17,000 active users I just can't do it without major disruptions to my site

          Comment

          • sross
            Senior Member
            • Mar 2004
            • 660

            #6
            The error only happens once every few days, i have never seen it and users have never seen it. i just get emailed it by my server..

            Comment

            • Steve Machol
              Former Customer Support Manager
              • Jul 2000
              • 154488

              #7
              My instructions will not cause major disruptions unless you have installed add-ons. In that case we cannot provide official support anyway. You will need to reveert back to the original vB code to see if you still have a problem, or ask for help over at www.vbulletin.org.
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment

              • telc
                Senior Member
                • Oct 2001
                • 239
                • 3.5.x

                #8
                I am have been getting the same exact error for the past several days at the same time 12:00AM.

                I am not running any modified vbulletin files.

                Code:
                Database error in vBulletin 3.6.2:
                 
                Invalid SQL:
                 
                DELETE FROM access
                WHERE forumid IN (N;) AND
                userid = 29968;
                 
                MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ';) AND
                userid = 29968' at line 2
                Error Number : 1064
                Date : Monday, January 22nd 2007 @ 12:00:00 AM
                Script : [URL]http://forums.mydomain.com/cron.php?&rand=662764[/URL]
                Referrer : [URL]http://forums.mydomain.com/profile.php?do=editsignature[/URL]
                IP Address : 70.56.5.5
                Username : Unregistered
                Classname : vb_database
                It is always the same userid in the email.
                Last edited by telc; Sat 27 Jan '07, 6:19am.

                Comment

                • telc
                  Senior Member
                  • Oct 2001
                  • 239
                  • 3.5.x

                  #9
                  I think it may be a bug in the subscriptions cron. These database errors started to happen on 1/14/2007 every morning night at 12:00AM.

                  It is always the same userid. I checked the user is admin cp and he was a normal user with a subscription and it ended on 1/14/2007.

                  This user is now a moderator he had the subscription from before he was a moderator. Being a moderator gives his access to the forums that the payed subscription users get access to.

                  I think there is a bug in the logic in the code, I am going to try to narrow it down more.

                  Comment

                  • telc
                    Senior Member
                    • Oct 2001
                    • 239
                    • 3.5.x

                    #10
                    I fixed the issue. In the subscription table there was a "N;" in the 'forums' column for one of the subscriptions, I am not sure why vBulletin inserted this value into the table.

                    To fix the issue:
                    1) I went into admincp->subscription manager
                    2) Opened the problem subscription
                    3) Clicked "update"

                    After doing that the "N;" was removed from the 'forums' colum in the table and the cron was able to run.

                    This was SQL error was causing a backlog of subscriptions that where not being disabled when they expired.

                    Here is a screenshot of the table before fixing the issue:
                    Attached Files

                    Comment

                    • UtahOTF
                      New Member
                      • May 2002
                      • 1

                      #11
                      I can confirm everything telc has mentioned FWIW. This just happened on my forum last night. I don't run any modified files. Thanks for the fix BTW telc.
                      Last edited by UtahOTF; Sat 27 Jan '07, 8:00am.

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...