Debugging 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
Locked
Poppinfresh
Registered User
Posts: 2
Joined: Wed Jul 28, 2004 4:56 pm

Debugging error

Post by Poppinfresh » Wed Jul 28, 2004 7:48 pm

I'm in the process of doing a backup so I can update a board (we're still on 2.0.4), but in the meantime, I'd like to debug an issue that's come up on it, as I don't plan on doing the upgrade until tomorrow, after I've had some time to read up on the nuances of php and upgrading it without blowing up half the 'net :P.

Anyhow, I'm getting this error on the site frequently:

phpBB : Critical Error

Error clearing sessions table

DEBUG MODE

SQL Error : 1034 Incorrect key file for table: 'phpbb_sessions'. Try to repair it

DELETE FROM phpbb_sessions WHERE session_time < 1091040409 AND session_id <> 'd55c4e5b62e54f09dc9f49e041f259bd'

Line : 290


Codeslinging is kind of a secondary thing for me, and I know jack about SQL...looking for a step-by-step on how to go about fixing this. I've tried finding the file that holds sessions, but the trail runs cold after home/www ...the third quantifier isn't on the list. Will keep digging for it....but mostly, I'm interested in the items to delete...is it asking me to delete everything from the session time that is LESS than 1091040409, or just that item specifically? And I assume the d55c4e... it's asking me to delete is just that one item, not a range of them, correct?

juliekate
Registered User
Posts: 779
Joined: Sun May 05, 2002 5:32 pm
Location: Philadelphia
Contact:

Post by juliekate » Wed Jul 28, 2004 8:17 pm

Hmm well if you install http://www.phpmyadmin.net there is a function in it to repair tables. It sounds like it's just corrupted.

The session table (I gather thus far in my life) just stores registered users. I flush mine regularly, it's dynamic and rebuilds itself.

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

Post by geocator » Wed Jul 28, 2004 9:54 pm

Just for info and posibly what you were saying but to make it clear for all.

The sessions table stores info about logged in pepople and guest browsing your board. There is nothing super vital to the system, so reparing flushing etc are fine. Although if you do it while someone is on your site it could cause them a minor issue like having to relogin.

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Post by pentapenguin » Wed Jul 28, 2004 10:31 pm

In other words...run these two commands in phpmyadmin:

Code: Select all

REPAIR TABLE phpbb_sessions
THEN

Code: Select all

TRUNCATE TABLE phpbb_sessions
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

juliekate
Registered User
Posts: 779
Joined: Sun May 05, 2002 5:32 pm
Location: Philadelphia
Contact:

Post by juliekate » Thu Jul 29, 2004 12:37 am

penta, what does truncating a table do?

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut » Thu Jul 29, 2004 1:49 am

It deletes all of the rows in the table.

Some SQL databases dont support TRUNCATE, if yours is one of them, try

Code: Select all

DELETE FROM phpbb_sessions;
-- they do the same thing
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

Poppinfresh
Registered User
Posts: 2
Joined: Wed Jul 28, 2004 4:56 pm

Post by Poppinfresh » Thu Jul 29, 2004 3:14 am

Well, we don't get that error anymore...now we get:


DEBUG MODE

SQL Error : 1030 Got error 127 from table handler

SELECT f.*, p.post_time, p.post_username, u.username, u.user_id FROM (( phpbb_forums f LEFT JOIN phpbb_posts p ON p.post_id = f.forum_last_post_id ) LEFT JOIN phpbb_users u ON u.user_id = p.poster_id ) ORDER BY f.cat_id, f.forum_order

Line : 165


Went from bad to worse. Apparently this is strictly a problem with the SQL tables, but it happened right as I was upgrading the board from 2.0.4 to 2.0.10 (which I apparently didn't do right, either). I tried restoring a saved database, but it did no good. If anybody knows of a quick fix for this, it'd be a great thing...as it stands now, looking like we're gonna have to completely redo all the tables and fresh everything out...my SQL knowledgeable friends are drawing blanks with this one.

Locked

Return to “2.0.x Support Forum”