Announcement

Collapse
No announcement yet.

mysql 5 (strict mode) and vbulletin 2

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

  • mysql 5 (strict mode) and vbulletin 2

    I have already seen the same issue discussed in another thread, but was asked to make a new thread for the issue.

    Version of vbulletin: 2.3.0 (with patches)
    Version of mysql: 5.0.38
    Version of php: 5.2.1

    1 example of problem:
    Going to User Control Panel (usercp.php), creates this error:

    Database error in vBulletin 2.3.0:
    Code:
    Invalid SQL: SELECT privatemessage.*,touser.username AS tousername,fromuser.username AS fromusername,icon.title AS icontitle,icon.iconpath FROM privatemessage,user AS touser,user AS fromuser LEFT JOIN icon ON icon.iconid=privatemessage.iconid WHERE privatemessage.userid='1' AND folderid=0 AND touser.userid=privatemessage.touserid AND fromuser.userid=privatemessage.fromuserid AND messageread=0  ORDER BY dateline DESC
    mysql error: Unknown column 'privatemessage.iconid' in 'on clause'
    
    mysql error number: 1054
    Reply to thread makes this error:

    Code:
    Database error in vBulletin 2.3.0:
    
    Invalid SQL: SELECT user.*, style.templatesetid
                                   FROM subscribethread,user,usergroup
                                   LEFT JOIN style ON (IF(user.styleid=0, 1, user.styleid)=style.styleid)
                                   WHERE subscribethread.threadid='5421'
                                     AND subscribethread.userid=user.userid
                                     AND usergroup.usergroupid=user.usergroupid
                                     AND user.userid<>'1'
                                     AND user.usergroupid<>'3'
                                     AND usergroup.canview = 1
                                     AND user.lastactivity>'1188147895'
    mysql error: Unknown column 'user.styleid' in 'on clause'
    
    mysql error number: 1054
    I saw somebody talked about inserting some () in the code to get this to work. Could anybody give me some tips what to change to get this running?

    PS: vb3 upgrade is not an option at this moment and neither is any change of mysql.

  • #2
    Honestly I doubt vB 2.x is compatible with those versions of PHP and MySQL which were written years after vB2 was released. If you cannot upgrade vB, then you may have to downgrade PHP and MySQL. I don't know of any other choices.
    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


    • #3
      I suspect that if you rewrite all the queries to use LEFT/INNER joins (with proper ON statements) rather than using "FROM table1,table2,table3" etc then they will work. Might be a lot of work though.
      Baby, I was born this way

      Comment


      • #4
        I know vb2 is very old and outdated, but since it is integrated in so much codeof ours, its a big work to upgrade, and we just aren't able to do so for now.

        Not any easy changes I see, I thought it was possible to do this with just some (). Cross my fingers I will get to persuade our host to turn off mysql's strict mode.

        Thanks for the answer though.

        Comment


        • #5
          FYI, that's not strict mode. That's a fundamental change that MySQL 5 brought about. You can't disable it.

          Strict mode would cause all sorts of other problems, I'm sure.

          Comment

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