[pmwiki-users] Auth User: Expiration of session

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 16 10:50:40 CDT 2006


On Mon, Oct 09, 2006 at 10:00:18PM +0200, kirpi at kirpi.it wrote:
> > > ...is there a way to change that?
> 
> > ...the actual expiration time can be affected by the
> > setting of session.gc_maxlifetime in other PHP applications
> > running on the same server.
> 
> I would restate the original question: is there an *easy* way to
> change (read: force) expiration after a certain amount of time?
> Something (as an example) that we can set in config.php?

You need a custom directory for storing sessions, and to set
the time for session expiration.

At the top of local/config.php, add:

    session_save_path('work.d');
    ini_set('session.gc_maxlifetime', 1200);

Here, 1200 indicates the number of seconds for which a session
is valid (1200 == 20 minutes).

You'll need to create the 'work.d' directory and give the
webserver appropriate permissions to it.  You'll probably
also want to copy the .htaccess file from wiki.d/ into work.d/ .

Pm




More information about the pmwiki-users mailing list