Database Error after upgrade from 3.8.5 to 4.1.3 PL1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • n1co1982
    New Member
    • May 2009
    • 9
    • 3.8.x

    [Forum] Database Error after upgrade from 3.8.5 to 4.1.3 PL1

    My forum gets a database error when I try to access it. It was working fine on 3.8.5

    I did the upgrade by using command line since my database is big.

    The upgrade itself went smoothly, but after it completes I can't login to the forum anymore, only a database error screen appears.

    I tried to re run the upgrade using the browser interface and again it went well, but got database error when trying to access the forums after it finished.

    I looked at includes/config.php and database settings were good and untouched. Looked at mysqld.log and error_log for apache and no errors were showing.

    After that I restored my backup and went back to version 3.8.5 and then created a new database called forum2 to restore the same backup and do a test upgrade on the forum2 db with the same binaries on a different location to make a test and see if I could figure the error out without having my main forum offline.

    After that backup is restored I changed the database name on config.php and tested it with the user I have on mysql, everything went fine. When I tried to login to forum2 I got the same database error that I had when upgraded the production forum to vB4. I am clueless on what to do now because when I restored it to the original db called forum it worked, my old forum was back online perfectly.

    Can you give me any directions? Maybe its a licensing problem since I am trying to do tests on this duplicated environment? I believe the license allows it, if not I'll delete it.

    Click image for larger version

Name:	dberror.jpg
Views:	1
Size:	50.3 KB
ID:	3720658
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24359
    • 5.7.X

    #2
    You need to right click on that page and select the view source option, scroll to the bottom of the source code and copy the error from there for us to be able to help.
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • n1co1982
      New Member
      • May 2009
      • 9
      • 3.8.x

      #3
      Database error in vBulletin 3.8.5:
      Invalid SQL:
      select * from off_style where styleid = or styleid = 5 ORDER BY styleid ASC;
      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 'or styleid = 5 ORDER BY styleid ASC' at line 1
      Error Number : 1064
      Request Date : Wednesday, June 8th 2011 @ 10:57:24 AM
      Error Date : Wednesday, June 8th 2011 @ 10:57:24 AM
      Script : http://www.forumoff.com/off4/
      Referrer :
      IP Address : 201.73.44.182
      Username : Não Registrado
      Classname : vB_Database_MySQLi
      MySQL Version :
      -->

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24359
        • 5.7.X

        #4
        The fact that the database error is saying "Database error in vBulletin 3.8.5" would suggest that it's still a 3.8.5 file or database that's there. If you open up the file within the /off4 directory, what is the vB version at the top? And if you look in the upgradelog table for that database, what is the latest entry there?
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        • n1co1982
          New Member
          • May 2009
          • 9
          • 3.8.x

          #5
          ok, now its correctly updated. I run all the proccess again in my production environment. There is a similar error:

          <!--
          Database error in vBulletin 4.1.3:
          Invalid SQL:
          select * from off_style where styleid = or styleid = 6 ORDER BY styleid ASC;
          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 'or styleid = 6 ORDER BY styleid ASC' at line 1
          Error Number : 1064
          Request Date : Wednesday, June 8th 2011 @ 01:30:24 PM
          Error Date : Wednesday, June 8th 2011 @ 01:30:24 PM
          Script : http://www.forumoff.com/login.php?do=login
          Referrer : http://www.forumoff.com/admincp/
          IP Address : 201.73.44.182
          Username : Não Registrado
          Classname : vB_Database_MySQLi
          MySQL Version :
          -->

          Comment

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

            #6
            Invalid SQL errors are almost always related to modified code.

            To troubleshoot this, first 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. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

            Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

            [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

            Next, disable all products (except vB Blog and vB CMS if you are running the Suite.)

            Admin CP -> Plugins & Products -> Manage Products -> Disable

            Then manually uncheck all plugins that are not for 'vBulletin Blog' and vBulletin CMS' here:

            Admin CP -> Plugins & Products -> Plugin Manager

            Then if you still have this problem, 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

            • n1co1982
              New Member
              • May 2009
              • 9
              • 3.8.x

              #7
              I restored the backup, removed all addons and performed the upgrade.

              It works now, thanks.

              Comment

              Related Topics

              Collapse

              Working...