Jump to content

old search id sessions


Recommended Posts

Guest idavid
Posted

am being plaqued with the message 'cannot delete old search id sessions' whenever i try and do any sort of search. anyone care to eleborate? :?

Guest drblow
Posted

Me too! It happened the other day aswell, but then just stopped. Hope Paul can sort this coz its well annoying! :evil:

Guest akarno
Posted

Yes I'm getting the same thing. I usually start with view post since last visit, but this function has not been working for several days, same error message as search. :cry:

Guest Monolithix [MVP]
Posted

A long shot, but it might be a cookie bug? Try nuking the modaco cookie and see if it helps.

Guest Monolithix [MVP]
Posted

In your Temporary internet files folder (In IE: Tools > Internet Options > Temporary Files Settings > View files).

I just had a play and it looks like i'm probably talking bull though :/

Guest MrMagoo
Posted

nah, this is an internal error in the forum...it happens when phpBB2 tries to clear down old session data from the search tables...

one possible fix is to run this sql:

REPAIR TABLE phpbb_search_results

another would be to try emptying the table - it may have got too big or have some corrupt data

Guest drblow
Posted

Damn this thing! :evil: I hate not being able to view posts since last visit.

Guest idavid
Posted

yeah. posts since last visit is essential. :cry:

Guest afroahmed
Posted

cna comfirm this prolem is back for me 2

Guest MrMagoo
Posted

mmmm... now if this was a bug on the phone I think Mr Orange would be getting abuse right about now...

so to be fair and even handed:

c'mon modaco admin :evil: :evil: :evil:

this is simple... fix this damn bug :x :evil: :shock:

:wink:

Guest MrMagoo
Posted

btw: if you are desperate for "new posts" functionality, you could always use the RSS Feed

p.s. if u spot something interesting don't tell the mods :wink: !

Guest drblow
Posted
It's working again :D

no it aint! :x It was this morning at about 10am - but now its broke again!!

Guest markd66
Posted

It's playing up again - intermittantly...

Cheers, Mark.

Guest afroahmed
Posted

yeh i can confirm it isnt working. WHAT THE HELL IS UP WITH THIS FORUM???? lol sorry forv the caps

Guest MrMagoo
Posted

right - maybe we can all help here - cos they are obviously having a hard time trying to fix it...

The error

Could not delete old search id sessions
comes from a php source called search.php.

                               $sql = "DELETE FROM " . SEARCH_TABLE . "


                                        WHERE session_id NOT IN (" . implode(",


", $delete_search_ids) . ")";


                                if ( !$result = $db->sql_query($sql) )


                                {


                                        message_die(GENERAL_ERROR, 'Could not de


lete old search id sessions', '', __LINE__, __FILE__, $sql);


                                }
This error can only occur (assuming this file has not been altered by the admins) if the sql does not execute cleanly in the database ('DELETE FROM ..."), which could be because : 1. the sql statement cannot be built - which would only happen if there were too many "live" sessions in the system ($delete_search_ids is an array of these "live" session ids) for php to cope with when it is trying to convert the array to a string (comma seperated). OR 2. the sql statement is built correctly but fails when executed - which in turn could be due to any number of problems. My recommendation is to replace this "dodgy" code like this: 1. open search.php 2. find " // Finish building query (for all combinations)" (around line 609 in a vanilla install) 3. comment out
               $sql = "SELECT session_id


                        FROM " . SESSIONS_TABLE;


                if ( $result = $db->sql_query($sql) )


                {


                        $delete_search_ids = array();


                        while( $row = $db->sql_fetchrow($result) )


                        {


                                $delete_search_ids[] = "'" . $row['session_id']


. "'";


                        }




                        if ( count($delete_search_ids) )


                        {


                                $sql = "DELETE FROM " . SEARCH_TABLE . "


                                        WHERE session_id NOT IN (" . implode(",


", $delete_search_ids) . ")";


                                if ( !$result = $db->sql_query($sql) )


                                {


                                        message_die(GENERAL_ERROR, 'Could not de


lete old search id sessions', '', __LINE__, __FILE__, $sql);


                                }


                        }


                }
4. Insert
               $sql = "DELETE " . SEARCH_TABLE . "


                        FROM " . SEARCH_TABLE . "


                        LEFT OUTER JOIN " . SESSIONS_TABLE . "


                        ON " . SEARCH_TABLE . ".session_id = " . SESSIONS_TABLE


. ".session_id


                        WHERE " . SESSIONS_TABLE . ".session_user_id IS NULL;";


                $result = $db->sql_query($sql);

this makes for a better way of clearing old search results (using the database instead of php to do the work) and also removes the stupid error message which stops you searching just because a bit of housework has failed.

note: this will only work if you are using mysql version 4 and above i think - you might need to tweak it otherwise

hope this helps...

Guest drblow
Posted

Mr. Magoo - ar ethose instructions of rthe moderators, or for individual users? I didn't understand a word I'm afraid! :oops:

Its working for me again now anyways! :D

Guest MrMagoo
Posted
Mr. Magoo - ar ethose instructions of rthe moderators, or for individual users?  I didn't understand a word I'm afraid!  :oops: 

Its working for me again now anyways!  :D

That was a suggestion for the site admins. there is nothing we can do ourselves, it is a problem with the way the forum works.

Guest kyrkesmith
Posted

The search function on this site has always been pretty crap.

Paul, you waiting for phpBB 2.2?

Guest stevo_knuckles
Posted
btw: if you are desperate for "new posts" functionality, you could always use the RSS Feed  

p.s. if u spot something interesting don't tell the mods  :wink: !

Sme thing happening to me too now :cry: Mr Magoo how do we set it up for the rss feed? Can't search for it if it's posted on here :D

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.