sessions.php error

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

sessions.php error

Post by Agent F » Mon Mar 19, 2007 12:16 am

For a reason unknowing to me, I am receiving this error on my site. Can someone give me some idea on how to fix this error. Here it is:
phpBB : Critical Error

Error doing DB query userdata row fetch

DEBUG MODE

SQL Error : 1030 Got error 127 from table handler

SELECT u.* FROM phpbb_users u, phpbb_sessions_keys k WHERE u.user_id = 6 AND u.user_active = 1 AND k.user_id = u.user_id AND k.key_id = '6fe452f89bc1206f20a421f160126e44'

Line : 89
File : sessions.php
Image

User avatar
techwizz78
Registered User
Posts: 63
Joined: Thu Dec 09, 2004 6:29 am
Location: Cyber Space
Contact:

Re: sessions.php error

Post by techwizz78 » Mon Mar 19, 2007 12:32 am

Looks like a mysql error or a db error.

What did you do? Must have changed something?

Its unable to select that user from the db. Basically.
Image

Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

Re: sessions.php error

Post by Agent F » Mon Mar 19, 2007 12:39 am

Neither I, nor the other 2 Administrators of my forum have touched the database. One of them even replaces the db with an older copy to see if it would work, but it didn't. I get this error on the index page of the forum.

If it isn't a database error, how can I fix the mySQL error or is that something on my host's end?
Image

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Re: sessions.php error

Post by geocator » Mon Mar 19, 2007 12:56 am

Run the following query in phpmyadmin:

Code: Select all

REPAIR phpbb_sessions_keys;

nycore
Registered User
Posts: 185
Joined: Tue Apr 05, 2005 10:45 pm
Location: NYC
Contact:

Re: sessions.php error

Post by nycore » Mon Mar 19, 2007 12:58 am

Ive been getting these same errors a few times per day since I upgraded to the latest version of phpbb

To fix it you go into the database (using phpmyadmin for example) with:

repair table phpbb_sessions

For me it doesnt stay fixed but usually it works for a long time
Running site since 93. Current mods: Easy Mod, Custom Title, Avatar Resize, Simple Mod Resize Images, Longer Subject, Simple Quick Reply, URL Friendly Entry

User avatar
techwizz78
Registered User
Posts: 63
Joined: Thu Dec 09, 2004 6:29 am
Location: Cyber Space
Contact:

Re: sessions.php error

Post by techwizz78 » Mon Mar 19, 2007 1:08 am

Well... you could always shut the site down... .backup the db... and do clean install... then overwrite the new db with the old one.
Image

rvmomma
Registered User
Posts: 768
Joined: Fri Mar 09, 2007 5:23 pm

Re: sessions.php error

Post by rvmomma » Mon Mar 19, 2007 1:37 am

yes, and if your car gets a flat, you could just blow it up and get a new one.

that is not very good advice in this situation. as a matter of fact , that is rarely necessary for any reason.

User avatar
techwizz78
Registered User
Posts: 63
Joined: Thu Dec 09, 2004 6:29 am
Location: Cyber Space
Contact:

Re: sessions.php error

Post by techwizz78 » Mon Mar 19, 2007 1:54 am

rvmomma wrote: yes, and if your car gets a flat, you could just blow it up and get a new one.

that is not very good advice in this situation. as a matter of fact , that is rarely necessary for any reason.



It takes... 4 minutes....

Can you buy a car for 4 minutes worth or work? You make some $$$ if thats the case.

What do you do by the way?

He's tried other solutions...in this case that may be the quicker solution. He's upgraded... its not working.

A clean install may be the "quickest" way to deal with this randomly occuring error. 8O
Image

Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

Re: sessions.php error

Post by Agent F » Mon Mar 19, 2007 3:10 am

within phpMyAdmin, how do I run the query? I logged in and selected the main database that we use for the forum. Then i went into Query and in the SQL query on database test textbox, pasted the code and Submitted the form. Then i am told "You have to choose at least one column to display." I do not know anything really about databases or phpMyAdmin so could you please walk me through and dumb it down.
Image

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: sessions.php error

Post by karlsemple » Mon Mar 19, 2007 3:19 am

  1. Create a fix.php file with the following:

    Code: Select all

    <?php
    define('IN_PHPBB', true);
    include('./extension.inc');
    include('./common.'.$phpEx);
    $page_title = 'phpBB Fix';
    
    $sql = array();
    $sql[] = "REPAIR TABLE " . SESSIONS_KEYS_TABLE . "";
    
    
    $sql_count = count($sql);
    for( $i = 0; $i < $sql_count; $i++ )
    {
       if ( !($result = $db->sql_query($sql[$i])) )
       $echo .= '<b>Query ' . ($i+1) . ': </b><font color="red"><b>Error (' . mysql_error() . ')</b></font><br />';
       else
       $echo .= '<b>Query ' . ($i+1) . ': </b><font color="green"><b>Ran successfully</b></font><br />';
    }
    message_die(GENERAL_MESSAGE, "<table width=\"80%\" class=\"forumline\"><tr><td><u><b>Report:</b></u><br />$echo<br /><br />All queries have been run. If any errors came up above, be sure to post the report in your topic on phpBB.com.<br /><b>You should now delete this file</b></td><tr></table>");
    ?>
  2. Upload the file to your board's root folder (the one with config.php)
  3. Run it by navigating to the file in your browser (ex. http://www.yoursite.com/phpBB2/fix.php)
  4. If any errors come up, post the report here.
  5. Be sure to delete the file; don't leave it on your server
Image

Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

Re: sessions.php error

Post by Agent F » Mon Mar 19, 2007 3:23 am

I ran the file and this what was displayed:

message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?
Image

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: sessions.php error

Post by karlsemple » Mon Mar 19, 2007 3:26 am

Agent F wrote: I ran the file and this what was displayed:

message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?



you dont have the install and contrib folders still present do you?
Image

Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

Re: sessions.php error

Post by Agent F » Mon Mar 19, 2007 3:27 am

of course not. I needed to remove those during the installation process.
Image

User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: sessions.php error

Post by karlsemple » Mon Mar 19, 2007 3:31 am

It appears that the script has fixed the sessions_key error but there is another problem with the forum which is causing the message_die error, there is a mod which will give more detail about the problem.....if I can find a working download link for it seens as our mod section is still not working
Image

Agent F
Registered User
Posts: 201
Joined: Fri Sep 15, 2006 3:28 am
Location: phpbb_users

Re: sessions.php error

Post by Agent F » Mon Mar 19, 2007 3:32 am

would it be helpful to tell you of all the mods i have installed?

edit: now my forum is displaying a different error then my main page. I am using a portal system on my site called mkportal.

The main area of the site displayes the error posted above, but the forum index shows this message:
phpBB : Critical Error

Error creating new session

DEBUG MODE

SQL Error : 1062 Duplicate entry '-1' for key 2

INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin) VALUES ('a9d62b5476e48d5477a84171c59be944', -1, 1174275105, 1174275105, 'a139d572', 0, 0, 0)

Line : 187
File : sessions.php
Image

Locked

Return to “2.0.x Support Forum”