Help - - Database error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fort
    New Member
    • Sep 2016
    • 2
    • 4.2.x

    Help - - Database error

    Hello,

    We are having a major database problem. It seems like the session table has been corrupted or disapeared.
    Is it something you can help out with with?

    The errors below....

    Database error in vBulletin 4.2.1:

    Invalid SQL:

    SELECT *
    FROM fort_session
    WHERE userid = 0
    AND host = '31.208.97.132'
    AND idhash = '028813c623dbbb95d5d5452a76c0d344'
    LIMIT 1;

    MySQL Error : Table 'expatonline_se.fort_session' doesn't exist
    Error Number : 1146
    Request Date : Tuesday, August 16th 2016 @ 05:49:02 PM
    Error Date : Tuesday, August 16th 2016 @ 05:49:02 PM
    Script : http://www.expatonline.se/fort/
    Referrer : http://www.expatonline.se/fort/
    IP Address : 31.208.97.132
    Username :
    Classname : vB_Database_MySQLi
    MySQL Version :

    Stack Trace:

    #0 vB_Database->halt() called in [path]/includes/class_core.php on line 1400
    #1 vB_Database_MySQLi->execute_query() called in [path]/includes/class_core.php on line 503
    #2 vB_Database->query_first() called in [path]/includes/class_core.php on line 534
    #3 vB_Database->query_first_slave() called in [path]/includes/class_core.php on line 3744
    #4 vB_Session->vB_Session() called in [path]/includes/init.php on line 632
    #5 require_once([path]/includes/init.php) called in [path]/includes/class_bootstrap.php on line 101
    #6 vB_Bootstrap->init() called in [path]/includes/class_bootstrap.php on line 72
    #7 vB_Bootstrap->bootstrap() called in [path]/global.php on line 26
    #8 require_once([path]/global.php) called in [path]/forum.php on line 67
    #9 require([path]/forum.php) called in [path]/index.php on line 43


    Emailed error from the website

    Database error in vBulletin :

    mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known /customers/f/8/4/expatonline.se/httpd.www/fort/includes/class_core.php on line 1356

    MySQL Error :
    Error Number :
    Request Date : Tuesday, August 30th 2016 @ 10:47:59 AM
    Error Date : Tuesday, August 30th 2016 @ 10:48:06 AM
    Script : http://www.expatonline.se/fort/cron.php?rand=1467543222
    Referrer :
    IP Address : 85.25.210.234
    Username :
    Classname : vB_Database_MySQLi
    MySQL Version :

    Stack Trace:

    #0 vB_Database->halt() called in [path]/includes/class_core.php on line 5661
    #1 catch_db_error() called in on line
    #2 mysqli_real_connect() called in [path]/includes/class_core.php on line 1356
    #3 vB_Database_MySQLi->db_connect() called in [path]/includes/class_core.php on line 282
    #4 vB_Database->connect() called in [path]/includes/init.php on line 189
    #5 require_once([path]/includes/init.php) called in [path]/includes/class_bootstrap.php on line 101
    #6 vB_Bootstrap->init() called in [path]/includes/class_bootstrap.php on line 72
    #7 vB_Bootstrap->bootstrap() called in [path]/global.php on line 26
    #8 require_once([path]/global.php) called in [path]/cron.php on line 41


    Thanks
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24287
    • 6.0.X

    #2
    If you look directly in the database, do you see the session table there?

    What happens if you run this query?
    TRUNCATE TABLE session
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • Paul M
      Former Lead Developer
      vB.Com & vB.Org
      • Sep 2004
      • 9886

      #3
      The first error says your session table was missing, which is bad, even though its a memory based table, it should never go awol.

      The second error is unrelated to the first, it indicates a failure (probably dns lookup) when php was trying to find your database server, to connect to it.

      The two of them suggest you have hosting issues.
      Baby, I was born this way

      Comment

      • Fort
        New Member
        • Sep 2016
        • 2
        • 4.2.x

        #4
        Originally posted by Paul M
        The first error says your session table was missing, which is bad, even though its a memory based table, it should never go awol.

        The second error is unrelated to the first, it indicates a failure (probably dns lookup) when php was trying to find your database server, to connect to it.

        The two of them suggest you have hosting issues.
        Hi Paul and Mark. Thank you for having a look at the issues.

        If i run TRUNCATE TABLE session I get
        #1146 - Table 'expatonline_se.session' doesn't exist

        Which is what the first error is saying.

        In the list of tables in phpadmin there is no fort_session but a fort_cpsession.

        Comment

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

          #5
          You'll need to recreate the session table. Try running this query in phpMyAdmin:

          Code:
          CREATE TABLE fort_session (
              sessionhash CHAR(32) NOT NULL DEFAULT '',
              userid INT UNSIGNED NOT NULL DEFAULT '0',
              host CHAR(15) NOT NULL DEFAULT '',
              idhash CHAR(32) NOT NULL DEFAULT '',
              lastactivity INT UNSIGNED NOT NULL DEFAULT '0',
              location CHAR(255) NOT NULL DEFAULT '',
              useragent CHAR(100) NOT NULL DEFAULT '',
              styleid SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              languageid SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              loggedin SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              inforum SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              inthread INT UNSIGNED NOT NULL DEFAULT '0',
              incalendar SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              badlocation SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              bypass TINYINT NOT NULL DEFAULT '0',
              profileupdate SMALLINT UNSIGNED NOT NULL DEFAULT '0',
              apiclientid INT UNSIGNED NOT NULL DEFAULT '0',
              apiaccesstoken VARCHAR(32) NOT NULL DEFAULT '',
              isbot TINYINT NOT NULL DEFAULT '0',
              PRIMARY KEY (sessionhash),
              KEY last_activity USING BTREE (lastactivity),
              KEY user_activity USING BTREE (userid, lastactivity),
              KEY guest_lookup (idhash, host, userid),
              KEY apiaccesstoken (apiaccesstoken)
          Vote for:

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

          Comment

          Related Topics

          Collapse

          Working...