[Pmwiki-users] PHP Sessions / Cookies / Authentication / Cache

Thomas -Balu- Walter list+pmwiki-users
Fri Jun 25 09:07:21 CDT 2004


On Fri, Jun 25, 2004 at 07:21:47AM -0600, Patrick R. Michaud wrote:
> There's another problem with PHP sessions, in that the session data
> is automatically expired after 24 minutes.  This means that if someone
> doesn't interact with the site at least once every 24 minutes, then their
> session data can be lost.

Whow interesting. At work I am coding a CMS in PHP (yes, there are
thousands ;) and we are using PHP sessions to track our logged in users.

In the system settings of that system you can set a idle timeout (which
does not effect session settings) and people seem to be able to stay
longer in there. (Rethinking this I believe it's the reloading frame on
top that keeps people in the session :)

[...]
> PHP does have a "session.gc_maxlifetime" variable, but I haven't been to
> get it to reliably increase the amount of time a session is allowed to live.
> I suspect that if other PHP scripts are running on the same server that
> don't change session.gc_maxlifetime, then those scripts may clean up
> sessions older than the default of 1440 seconds.  The solution may be
> to change the directory where session data is stored, but that introduces
> its own set of headaches...

Ever tried switching session.save_path to a directory where others don't
store their session? Another idea would be to create your own session
handlers.

-- Balu



More information about the pmwiki-users mailing list