UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages'; error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RampantLion
    New Member
    • Jun 2010
    • 5
    • 4.0.0

    [Forum] UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages'; error

    I am attempting to update from 4.0.3 to 4.0.4 and I am getting the following error:


    Database error in vBulletin 4.0.3:

    Invalid SQL:
    UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages';

    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 'UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages'' at line 1
    Error Number : 1064
    Request Date : Friday, June 18th 2010 @ 06:01:01 AM
    Error Date : Friday, June 18th 2010 @ 06:01:01 AM
    Script : *******/install/upgrade_404.php?step=2
    Referrer : *******/install/upgrade_404.php?step=1
    IP Address : ***.71.120.76
    Username :
    Classname : vB_Database
    MySQL Version : 5.1.46-log
  • zelnik
    Senior Member
    • Aug 2008
    • 388
    • 4.2.X

    #2
    Are you running any addons?

    Not seen this error posted before as yet so I would disable any plugins/addons you may have and try again

    Comment

    • cinenganos
      New Member
      • Dec 2004
      • 18

      #3
      I am also getting the same error. No addons, pure vB uploaded. There seems to be an error in the query created.

      PHP Code:
      Invalid SQL:
      UPDATEvB_setting SET value 3 WHERE varname 'viewattachedimages';

      MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATEvB_setting SET value = 3 WHERE varname = 'viewattachedimages'' at line 1
      Error Number  
      1064
      Request Date  
      FridayJune 18th 2010 12:31:37 PM
      Error Date    
      FridayJune 18th 2010 12:31:37 PM
      Script        
      : ****/install/upgrade_404.php?step=2
      Referrer      
      : ***/install/upgrade_404.php?step=1
      IP Address    
      : ******
      Username      
      Classname     vB_Database
      MySQL Version 
      5.0.90-community-log 

      Comment

      • RampantLion
        New Member
        • Jun 2010
        • 5
        • 4.0.0

        #4
        I have disabled all plugins and add-ons and I am still getting the error.

        Comment

        • cinenganos
          New Member
          • Dec 2004
          • 18

          #5
          There's indeed a bug in the upgrade_404.php file. The block in line 231, when creating the query.

          PHP Code:
              if (!$vbulletin->options['attachthumbs'] AND $vbulletin->options['viewattachedimages'] == 1)
              {
                  
          // Set viewattachedimages = 3 when we had thumbnails disabled and view full images enabled
                  
          $upgrade->run_query(
                      
          sprintf($upgradecore_phrases['altering_x_table'], 'setting'11),
                          
          "UPDATE" TABLE_PREFIX "setting SET value = 3 WHERE varname = 'viewattachedimages'"
                  
          );
              } 
          the UPDATE needs a space, so that it ends up being:

          PHP Code:
          "UPDATE " TABLE_PREFIX "setting SET value = 3 WHERE 

          Comment

          • cinenganos
            New Member
            • Dec 2004
            • 18

            #6
            The fix solves the error. The SQL string is wrongly created. This must be fixed by vB, but if you edit the line, you can run the script with all OK.

            Comment

            • zelnik
              Senior Member
              • Aug 2008
              • 388
              • 4.2.X

              #7
              Internet Brands QA people have a lot to answer for!

              Comment

              • zelnik
                Senior Member
                • Aug 2008
                • 388
                • 4.2.X

                #8
                Originally posted by cinenganos
                The fix solves the error. The SQL string is wrongly created. This must be fixed by vB, but if you edit the line, you can run the script with all OK.
                thanks for the fix!
                Last edited by zelnik; Fri 18 Jun '10, 3:15am.

                Comment

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

                  #9
                  Bug raised:

                  Vote for:

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

                  Comment

                  • CyberSultan
                    Member
                    • Oct 2009
                    • 87

                    #10
                    So when can we expect the install files to be fixed and re-posted so that we do not have to make fixes to the installation files ourselves?

                    Comment

                    • Trekkan
                      Senior Member
                      • Oct 2008
                      • 224
                      • 4.0.0

                      #11
                      Originally posted by CyberSultan
                      So when can we expect the install files to be fixed and re-posted so that we do not have to make fixes to the installation files ourselves?
                      If you can't add a space to a text file without screwing it up, you might want to have someone else do the install.

                      Comment

                      • CyberSultan
                        Member
                        • Oct 2009
                        • 87

                        #12
                        This isn't the only post about issues with the install. I can update a file just fine. I shouldn't have to, though. So I'm glad you feel ok doing that with a product you purchased when it is obviously a screw-up that should be fixed by them.

                        Comment

                        • Boofo
                          Senior Member
                          • Apr 2002
                          • 2033
                          • 4.1.x

                          #13
                          That is strange. I upgraded fine with no error with the original code.
                          vBulletin - Sometimes, I'm just like, Wow, and then I'm like, Whoa, and then I'm like, Damn.

                          vBulletin.org's ol' Moderator

                          I have a lifetime terrorist hunting permit - #091101

                          chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

                          Comment

                          • sportsfroma2
                            Member
                            • May 2010
                            • 35

                            #14
                            phew, thanks for posting this... really got my blood pressure up when I thought I f'ed up somewhere. Luckily It happenind during the upgrade of my test site, but still.. scary

                            Vb Team, can you PLEASE fix this in the download package? I don't get why the status is "scrubbed" in the bug tracker by the way

                            Comment

                            • User213029312
                              Member
                              • Mar 2004
                              • 32
                              • 4.1.x

                              #15
                              Originally posted by cinenganos
                              There's indeed a bug in the upgrade_404.php file. The block in line 231, when creating the query.

                              PHP Code:
                                  if (!$vbulletin->options['attachthumbs'] AND $vbulletin->options['viewattachedimages'] == 1)
                                  {
                                      
                              // Set viewattachedimages = 3 when we had thumbnails disabled and view full images enabled
                                      
                              $upgrade->run_query(
                                          
                              sprintf($upgradecore_phrases['altering_x_table'], 'setting'11),
                                              
                              "UPDATE" TABLE_PREFIX "setting SET value = 3 WHERE varname = 'viewattachedimages'"
                                      
                              );
                                  } 
                              the UPDATE needs a space, so that it ends up being:

                              PHP Code:
                              "UPDATE " TABLE_PREFIX "setting SET value = 3 WHERE 
                              Thank you so much for your help!! I thought I had done something wrong! This was greatly appreciated! =)

                              Comment

                              Related Topics

                              Collapse

                              Working...