Hi,

I have implemented the Auto session timeout after the
specific period of time. 

What i am doing is..At the time of login to the
system, my script is storing the current unix time
into the session and later on at every user click, It
(my script) is checking the stored unix time with the
current time. So, if you want to auto logout the user
after 30 minutes of inactivity then you need to store
auto session timeout interval to 30 min. 

Algorith is..If session stored time + auto session
timeout interval > current time then my script
automatically logout the user from the system
otherwise my script stores the current unix time in
the session.

My problem is.. If user is doing some work on the
particular page (Ex. user is writing some stuff on the
specific page) but my script is counting this thing to
inactive period.. so after 31 minutes if user is
completing the writing and hit submit button then he
is getting the session expired screen and he is
loosing all the contents on that particular page..
Please let me know if any one has solution for this.

Let me know if i am unclear at any point.

Thanks

Hardik


--- "John W. Holmes" <[EMAIL PROTECTED]> wrote:
> Tan Ai Leen wrote:
> > Hi,
> > Can someone confirm that php does not have a auto
> timeout feature? Meaning
> > something like session will auto expire
> irregardless of whether the browser
> > is close or not?
> 
> If you're using the default session handler and
> storing the session 
> files in the location specified in php.ini, then the
> files will be 
> deleted by the garbage collection process after so
> many minutes of not 
> being accessed. So, whether the browser window is
> open or not, the file 
> will be deleted if it hasn't been accessed, thus
> ending the session.
> 
> The time that this happens isn't exact, though,
> since garbage collection 
> is triggered based upon traffic to your site and a
> probability you set 
> in php.ini. It's close enough for government work,
> though. :)
> 
> -- 
> ---John Holmes...
> 
> Amazon Wishlist:
> www.amazon.com/o/registry/3BEXC84AB3A5E/
> 
> PHP|Architect: A magazine for PHP Professionals –
> www.phparch.com
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________
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

Reply via email to