[imp] Default session timeout with IMP 3.1.

Eric Rostetter eric.rostetter@physics.utexas.edu
Wed Oct 23 20:11:46 2002


Quoting Erik Enge <erik@nittin.net>:

> Hi all.
> 
> I'm using PHP 4.1.2, Horde 2.1 and IMP 3.1 with a Cyrus IMAP server.
> Everything seems to work fine, except that some users report that their
> sessions seem to time out on them.  Is there anyway I can set the
> timeout to about two hours or so?

Try tweaking session garbage collection values and cookie lifetimes in
your php.ini file.  Mine are set as:

session.gc_maxlifetime = 7200   ; garbage collection is now 2 hours
session.gc_probability = 25     ; percentage chance for gc each call
session.cookie_lifetime = 0     ; 0 means until browser restarted

Note that probability is per call to php.  This means if no one hits your
web site, then nothing will time out.  So it works well on busy web sites,
but poorly on low-hit web sites.  Low hit web sites should set the 
gc_probability to 100%.  High hit sites probably want it low to save
cpu time.  Medium sites like mine use something in-between.

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!