Re: CHECKING IF A SESSION IS ACTIVE OR NOT
| From: | John Hicks | Date: | Thu, 10 Jul 2003 15:53:17 +0000 |
| Subject: | Re: CHECKING IF A SESSION IS ACTIVE OR NOT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154748@lists.php.net to get a copy of this message | ||
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