Thanks alotttttttt.......
Is it possible to increase the probability which is by default 1% to 99 %
and make sure that session are destroyed after 10 mins by setting
session.gc_maxlifetime to 600.

Binay
----- Original Message -----
From: "CPT John W. Holmes" <[EMAIL PROTECTED]>
To: "Binay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 5:08 PM
Subject: Re: [PHP] Destroying session if not being used from past 10 mins.


> From: "Binay" <[EMAIL PROTECTED]>
>
> > How can I configure the session to get destroyed,
> > if not being used from past 10 mins.
>
> If you're using the default session handler, the session files are cleaned
> up after not being used for 1440 seconds (by default), and the session is
> basically destroyed. You can adjust the session.gc_maxlifetime setting in
> php.ini to adjust the time.
>
> This time isn't exact, though. The cleanup process is based upon a
> probability that is 1% by default. That means the process has a 1% chance
of
> being started when there is a request to your site. So the files may be
> older than 1440 seconds and just waiting for the garbage collection
process
> to be initiated.
>
> If you need it to be exactly 10 minutes of inactivity, the best method is
to
> just store the time of the last request as a session variable and do the
> checking yourself upon each request. If the last request was more than 10
> minutes ago, then handle it accordingly.
>
> ---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to