Cron.php generating a db error every day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbozio
    Member
    • Mar 2002
    • 55
    • 5.0.X

    Cron.php generating a db error every day

    Since i upgraded to 3.5.4 i keep getting this error everyday. I did some search here but cannot find anything about it. Any idear ?

    Code:
    [SIZE=2]Database error in vBulletin 3.5.4:
    Invalid SQL:
    SELECT user.userid, user.usergroupid, username, email, activationid, user.languageid
    FROM user AS user
    LEFT JOIN useractivation AS useractivation ON (user.userid=useractivation.userid AND type = 0)
    WHERE user.usergroupid = 3
    AND ((joindate >= 1146525224 AND joindate <= 1146611624) OR (joindate >= 1146179624 AND joindate <= 1146266024))
    AND NOT (user.options & );
    MySQL Error : You have an error in your SQL syntax near ') ' at line 7 Error Number : 1064
    Date : Thursday, May 4th 2006 @ 01:13:44 AM
    Script : [/SIZE][URL="http://forum.tkagiro.com/cron.php?&rand=160736"][U][SIZE=2][COLOR=#0000ff]http://forum.tkagiro.com/cron.php?&rand=160736[/COLOR][/SIZE][/U][/URL]
    [SIZE=2]Referrer : [/SIZE][URL="http://forum.tkagiro.com/forumdisplay.php?f=130"][U][SIZE=2][COLOR=#0000ff]http://forum.tkagiro.com/forumdisplay.php?f=130[/COLOR][/SIZE][/U][/URL]
    [SIZE=2]IP Address : 143.183.121.1
    Username : Unregistered
    Classname : vb_database
    [/SIZE]
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    First I recommend reuploading all the default vBulletin non-image files in ASCII mode, overwriting your current files. Also, turn off plugins globally in your vBulletin Options. Does this problem still occur then?
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • mbozio
      Member
      • Mar 2002
      • 55
      • 5.0.X

      #3
      did that, still get the error...
      i find out it is triggered by the Activation Reminder Email task.

      PS: I have no pluggins at all... and didn't find any setting to disable it all...

      Comment

      • mbozio
        Member
        • Mar 2002
        • 55
        • 5.0.X

        #4
        I made some search and find that the problem is in this statement at the begin of activate.php :

        PHP Code:
        // Send the reminder email only twice. After 1 day and then 5 Days.
        $users $vbulletin->db->query_read("
        SELECT user.userid, user.usergroupid, username, email, activationid, user.languageid
        FROM " 
        TABLE_PREFIX "user AS user
        LEFT JOIN " 
        TABLE_PREFIX "useractivation AS useractivation ON (user.userid=useractivation.userid AND type = 0)
        WHERE user.usergroupid = 3
        AND ((joindate >= " 
        . (TIMENOW TWODAYS) . " AND joindate <= " . (TIMENOW ONEDAY) . ") OR (joindate >= " . (TIMENOW SIXDAYS) . " AND joindate <= " . (TIMENOW FIVEDAYS) . "))
        AND NOT (user.options & " 
        $vbulletin->bf_misc_useroptions['noactivationmails'] . ")
        "
        ); 
        $vbulletin->bf_misc_useroptions['noactivationmails'] render as null... no clue where to search from here...

        Comment

        • mbozio
          Member
          • Mar 2002
          • 55
          • 5.0.X

          #5
          Should i send a support ticket ?

          Comment

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

            #6
            This means you are not running the original vB code. 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

            • Freddie Bingham
              Former vBulletin Developer
              • May 2000
              • 14057
              • 1.1.x

              #7
              I would guess you did not have the proper includes/xml/bitfield_vbulletin.xml in place when you upgraded to 3.5.4

              Make sure the 3.5.4 version of that file is in place. Enable debug mode by placing this in your includes/config.php:

              $config['Misc']['debug'] = true;

              Next go to your admin cp and look at the upper left corner. Click on 'Rebuild Bitfields'.

              Problem should be solved.

              Remove the line you added to config.php

              Comment

              • mbozio
                Member
                • Mar 2002
                • 55
                • 5.0.X

                #8
                Many thx problem solved...

                /cheer developers !

                Comment

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