Strange db error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cbiweb
    Senior Member
    • Apr 2004
    • 2658
    • 4.1.x

    Strange db error

    Working with an old community that's been offline for some time, but trying to resurrect it. It is version 3.5.1. I've moved it all onto my local machine for development, and it seems to be working fine except for a db error I'm getting locally, but not online.

    At the bottom of each page is something like this:


    Code:
    Database error in vBulletin 3.5.1:
    
    Invalid SQL:
    
                        UPDATE session
                        SET lastactivity = 1248702330, location = '/CBIWEB/dev/warmongers/forums.php?', loggedin = 2, inforum = 0, inthread = 0, incalendar = 0, badlocation = 0, useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)'
                        WHERE sessionhash = '4cdfbadb681f202266e7dc0e9dfcace8';
    
    MySQL Error  : Data too long for column 'useragent' at row 1
    Error Number : 1406
    Date         : Monday, July 27th 2009 @ 10:45:30 AM
    Script       : http://localhost/CBIWEB/dev/warmongers/forums.php?
    Referrer     : http://localhost/CBIWEB/dev/warmongers/login.php
    IP Address   : 127.0.0.1
    Username     : cbiweb
    Classname    : vB_Database
    Why does this happen on my local machine but not on the production server?
    ~ Life isn't always fair, but you can be. ~
  • cbiweb
    Senior Member
    • Apr 2004
    • 2658
    • 4.1.x

    #2
    oops... ignore the above post. I'm running mysql in strict mode, and had to change this
    Code:
    $config['Database']['force_sql_mode'] = false;
    to this
    Code:
    $config['Database']['force_sql_mode'] = true;
    ~ Life isn't always fair, but you can be. ~

    Comment

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