Re: [phpslash-users] Re: Admin Session Timeout
Brought to you by:
joestewart,
nhruby
From: Matthew L. <lei...@ma...> - 2002-05-07 11:44:50
|
On Tue, 7 May 2002, Robin Bowes wrote: > Sam Williams writes: > > > Hi all, > > > > I'm doing lost of work on the site admin section at the moment, and my > > session keeps expiring... how can I increase the timeout value? I can't > > see an option for this in config.php3. > > Sam, > > phpSlash uses phplib for authentication, so did a quick grep in the phplib > directory and found the following in auth.inc: > > class Auth { > var $classname = "Auth"; > var $persistent_slots = array("auth"); > > var $lifetime = 15; ## Max allowed idle time before > ## reauthentication is necessary. > ## If set to 0, auth never expires. > > > This may be what you want. > > R. Of course, you want to modify the slashAuth class, not phplib's Auth class, because that's the class that's invoked at page_open. What you might do is extend slashAuth with an identical class that only has the lifetime member set to a higher value. Like so: class slashAuthAdmin extends slashAuth { var $lifetime=30; } then call that instead of slashAuth on your admin pages. I think because you're using the same password tables and everything, the only effect this will have is you get a longer lifetime before timeout. This is one of my pet peeves in phplib--if you are forced to reauthenticate, you lose all your get and post data. This could be worked around, but I just never got a round tuitt. One thing that does help is to "preview" your submissions often, if only to tell phplib that you're "still there." :-) HTH, Matt -- ---------------------------------------------------------------- Matthew Leingang http://www.math.rutgers.edu/ Rutgers University lei...@ma... Department of Mathematics /usr/games/fortune says: The University of California Statistics Department; where mean is normal, and deviation standard. |