I do something like this already with my user-defined session code.  I
can see a problem with trying to build something into the default
session code and then trying to define those multiple contexts within
the php.ini file.  How many contexts?  How would you tell automatically
which context should be 2 hours and which should be 15 minutes?

When I wrote my user-defined session code, I added an "application"
field that I use within my session handler routines to define expire
time and to allow different sections of our sites to have different
data.  (I wanted to separate portions of the site, lowering the
expiration time for accounting functions and raising the expiration for
non-essential functions, etc.)

Needless to say, I think PHP session support is excellent in that it
already allows user-defined routines. Building something like this into
the base session support could make basic sessions more complicated than
they'd need to be.  

Jaime Bozza

-----Original Message-----
From: André Nęss [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 30, 2001 9:10 AM

I find PHP session lacking in one area. In my applications I typically
want to have a long timeout for adminstrators so that they don't have to
log in all the time. A typical value is 2 hours. For users I prefer 15
minutes, based on the assumption that a user will go in, do his stuff,
and leave. For this to happen I need to have the gc_maxlifetime set to 2
hours, or risk unpredictable results for the administrators. The problem
with this is of course that garbage collection will run infrequently for
the entire system, even though most of the sessions expire after 15
minutes. It would therefore be nice to have something like "session
contexts", where you could have different session settings for each
context. Is this possible to achieve? Anyone else who can see the use of



--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to