Forum Error

Having problems with this site? Have Suggestions? Can't login? Check here for possible solutions. Anonymous postings ARE NO LONGER allowed here (thanks to the AUTO-BOTS spamming us).

Post Reply
AlC
Posts: 83
Joined: Sun Aug 12, 2007 9:02 am

Forum Error

Post by AlC » Thu Feb 21, 2008 5:58 am

What's up with the forum error:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] The search key was not found in any record., SQL state S1000 in SQLExecDirect in \\NAWINFS03\home\users\web\b1991\rh.shgafiles\forum\phpBB2\db\msaccess.php on line 178
phpBB : Critical Error

Error clearing sessions table

DEBUG MODE

SQL Error : Error

DELETE FROM phpbb_sessions WHERE session_time < 1203598373 AND session_id <> 'bc5f7bd27c9109ead57a70931b538a1d'

Line : 483
File : sessions.php

I get it from 2 different computers; 1 XP and 1 Vista. A refresh clears the error and lets me proceed. Started late last week.

- Alan

User avatar
Ken Andrews
Site Admin
Posts: 209
Joined: Mon Jun 06, 2005 8:22 pm
Location: Pasadena

Forum Error

Post by Ken Andrews » Thu Feb 21, 2008 7:09 pm

Excellent question. I updated the pilot forum about a week ago to the newest version of phpBB (the open source software that runs the forum), and corrected a couple errors in the database, and it's never been the same since. I modified the database using Microsoft Access 2007, and I'm guessing its "backward compatible with Access 2003" isn't actually as backward compatible as one would hope. It's very frustrating, but that's life with Microsoft.

All I can suggest is to hit the reload button; that always seems to work, though I don't know why. I'll fix the problem if I ever figure out how, and any suggestions from Microsoft Access 2007/2003/SQL Server wizards out there are welcome.

-Ken

User avatar
Chip
Site Admin
Posts: 645
Joined: Thu Apr 28, 2005 8:20 pm
Location: Sylmar, CA
Contact:

Researching

Post by Chip » Fri Feb 22, 2008 10:22 am

Same here, I'm researching the problem. It's not related to the mod for forum post (or so I believe) but it might be worth a try to bring the size back down to 4k to see if it helps.

Did the mod and the DB get done on the same day?

Overall Ken's suggestion works 100% of the time.

<Edited> :roll:

After looking at the php code it appears that we "may" have some corruption in the session table. It's possible we could recreate the table. The line that we're erroring out is in the end session function.

<More> :|
Looks like the session is timing out after 30 seconds. I've done a bunch of testing that shows if I move around the forum within 30 seconds I don't get the error. At 31 seconds the error will occur during your next navigation event. The board is set for 60 minutes (3600 secs). We'll focus on the session time for the fix.

The sessions table is cleared of "dead" sessions, so that it doesn't grow endlessly. How often this happens depends upon a number of factors, but, since PHP isn't always running, it will fit it in during other session-related tasks. That's why users that stay in any one area longer than 30 seconds get the SQL error.

After even more research it looks like the session table is the likely culprit. I think the table needs to be purged. More information here.

User avatar
Chip
Site Admin
Posts: 645
Joined: Thu Apr 28, 2005 8:20 pm
Location: Sylmar, CA
Contact:

Post by Chip » Mon Feb 25, 2008 3:06 pm

Problem fixed.

Ken writes:
After much investigation, I found that there were two corrupted
entries in the sessions table. These entries appeared in some
queries but not others, and could not be deleted.

The reported error, "The search key was not found in any record" (as quoted at http://www.shga.com/forum/phpBB2/viewtopic.php?t=918 for example) was misleading; the search key actually was found in thousands of records, but those two partly-invisible corrupted records refused to
go away when deleted, and that prevented the entire command from
executing.

I deleted the entire sessions table, and replaced it with a copy with
the same name and the same information. The problem appears to be
fixed. :)

AlC
Posts: 83
Joined: Sun Aug 12, 2007 9:02 am

Good Job

Post by AlC » Tue Feb 26, 2008 5:48 am

Thanks! No new occurances since this was done.

- Alan

Post Reply