There is no reliable way for the server (Apache, PHP, etc) to know when a user closes a session by closing his browser window. That's one reason why session-management sytems always employ a timeout on sessions. I don't know what the default timeout is for the PHP session-management system, but I believe you can set it.
But that raises the question: If you are already storing session IDs in a database table, why don't you do your own session managment instead of using the PHP system? --John On Thursday 10 July 2003 09:42 am, Nagib Abi Fadel wrote: > HI, > > I'm storing the sessions ids in a database table. I > want to run a script that reads from the table every > session id and check if this session is active or not. > > I know that session information is stored in a > directory (/tmp by default) and removed from there > when the session is closed. But if the user close his > browser without deconnecting from the session the > session file is still in the /tmp directory. > > How can i know if a session is still active or not !! > ??? > > I have searched the session functions and didn't find > anything that could help.... > > Thx for any Help > > N. > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php