Billy2423 wrote:Hmmm, I downloaded that zip yesterday to try it on a fresh install of phpbb v2.0.18 and that code was not in there..
If you alter the code your way you are going to have problems with your phpbb.
I do not understand what your saying cause the code is really the same as yours except that i did not do the
- Code: Select all
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE UNIX_TIMESTAMP() - session_time >=172800
AND session_id <> '$session_id'";
I will be checking this out further with my friend who
IS a programer to see if there is anything wrong with this..
We both seam to be around to help people and with that I wish you and family, Happy Holidays..
Ok I'll try to explain what the problem is, Your install text does not tell people to alter the following code:
- Code: Select all
#
#-----[ FIND ]------------------------------------------------
#
}
//
// Delete expired sessions
//
#
#-----[ FIND ]------------------------------------------------
#
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
AND session_id <> '$session_id'";
#
#-----[ REPLACE WITH ]--------------------------------
#
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE UNIX_TIMESTAMP() - session_time >=172800
AND session_id <> '$session_id'";
So if people do it your way their code will stay as the following which is the phpbb default:
- Code: Select all
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
AND session_id <> '$session_id'";
If you do that you will get problems trust me I already been there and done it!
You also say in a post yet it is not in your install script to do the following:
- Code: Select all
#-----[ FIND ]------------------------------------------------
#
}
//
// Delete expired sessions
//
#
#-----[ FIND ]------------------------------------------------
#
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
AND session_id <> '$session_id'";
#
#-----[ REPLACE WITH ]--------------------------------
The code really is:- Code: Select all
/**
* Removes expired sessions and auto-login keys from the database
*/
function session_clean($session_id)
{
global $board_config, $db;
//
// Delete expired sessions
???
Anyway let's just leave it at a difference of opinions as this thread is getting filled with posts that will just confuse people!
Hell I'm even starting to get confussed!
Ohhhh MERRY CHRISTMAS EVERYONE!