Announcement

Collapse
No announcement yet.

strange database errors

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

  • strange database errors

    Hey,
    I had to move our forums from one webserver to another primarily cause our old host disabled mail() and users weren't getting any response from the software.

    So since we move, this worked, but another thing occurred.

    When I login to the admin control panel with my administrator account it works at first. However, when I go into the "Users" section and edit a user I get the following error:

    Code:
    Database error in vBulletin Control Panel 2.2.1:
     
     Invalid SQL: SELECT COUNT(*) AS users FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND usergroup.cancontrolpanel=1 AND user.userid
     mysql error: You have an error in your SQL syntax near '' at line 1
     
     mysql error number: 1064
     
     Date: Monday 09th of December 2002 12:56:11 AM
     Script: http://BLAH/admin/user.php
     Referer: http://BLAH/admin/user.php?amp;action=edit&userid=271
    As you can see the variable holding the my user ID suddenly seems to disappear.

    This also happens with other accounts when I login on the board (not admin CP). It says "Thanks for logging in.", then tries to go to the forum homepage and it errors.

    Code:
     Database error in vBulletin 2.2.1:
    Invalid SQL: SELECT COUNT(*) AS messages FROM privatemessage WHERE userid= 
    mysql error: You have an error in your SQL syntax near '' at line 1
    mysql error number: 1064
    Date: Monday 09th of December 2002 01:08:02 AM
    Script: http://BLAH/index.php?
    Referer:
    There's also this error, when I login with the same account to do a reply:

    Code:
    Database error in vBulletin 2.2.1:
    Invalid SQL: SELECT vote, threadrateid FROM threadrate
    WHERE userid = AND threadid = '255'
    mysql error: You have an error in your SQL syntax near 'AND threadid = '255'' at line 2
    mysql error number: 1064
    Date: Sunday 08th of December 2002 10:46:40 PM
    Script: http://BLAH/newreply.php?action=newr...eadid=255&
    Referer: 
    


    I have no idea why. I checked the database and the data seems to be fine - not corrupted. Nothing is missing.

    I went over all tables with REPAIR and OPTIMIZE. Don't know what else to do.

    I registered a new account and everything seems to work. Just looks like the value is in the variable but not kept. I also tried to fix it and enabled REGISTER_GLOBALS and TRACK_VARS. Is there anything that I am missing?

    I also checked the browser's settings. The cookies are set, not like the info is not there. PHP just doesn't find them.

    I know a clean install would be an option, but I don't want to do that. We'd loose all posts and user data.

    Any help appreciated!

    Tom

  • #2
    Your new host is using PHP 4.2.x - your old one was running a lower version.

    To fix this problem, upgrade your forums to version 2.2.9.

    Comment


    • #3
      Originally posted by Cary
      Your new host is using PHP 4.2.x - your old one was running a lower version.

      To fix this problem, upgrade your forums to version 2.2.9.
      Thanks for the info!

      Comment


      • #4
        Same problem:

        Code:
        Database error in vBulletin 2.2.9:
        Invalid SQL: SELECT COUNT(*) AS messages FROM privatemessage WHERE userid= 
        mysql error: You have an error in your SQL syntax near '' at line 1
        mysql error number: 1064
        Date: Monday 09th of December 2002 01:52:43 AM
        Script: http://BLAH/index.php?
        Referer:
        I doublechecked with the newly created account. No luck.

        What's left to do? The forum is upgraded. The upgrades went through without an error. What exactly changed? Is there anything I can check?

        Thanks,
        Tom

        P.S.
        I am running PHP 4.2.2

        Comment


        • #5
          That's not the same problem. Are you sure you uploaded all the vB 2.2.9 files *and* ran all the appropriate upgrade scripts?

          http://www.vbulletin.com/members/upgrade.html
          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


          • #6
            Originally posted by Steve Machol
            That's not the same problem. Are you sure you uploaded all the vB 2.2.9 files *and* ran all the appropriate upgrade scripts?

            http://www.vbulletin.com/members/upgrade.html
            I moved all "old" files to a "20021209_backup" directory. Uploaded all files and ran the appropriate update files which I got off the link you mentioned as well.

            Do you want to try it?

            Tom

            Comment


            • #7
              If you have not installed any hacks, fill out a support ticket at:

              http://www.vbulletin.com/members/support_form.php

              Be sure to include the login info to your Admin CP, phpMyAdmin and FTP.

              If you have installed hacks, then remove the hacks first before filling out the support request.
              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

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