[pmwiki-users] Session Persistence
Patrick R. Michaud
pmichaud at pobox.com
Thu Jul 13 15:33:31 CDT 2006
On Thu, Jul 13, 2006 at 03:18:15PM -0500, Michael Gleicher wrote:
> In a recent thread, PM wrote about various ways to give sessions longer
> lifetimes.
>
> > This setting can also be changed in a per-directory .htaccess file,
> > or even possibly in config.php, but setting it in php.ini will lead
> > to the least amount of difficulties.
> >
>
> I would like to make the session timeout longer only for my one pmwiki
> installation (its on a server that does lots of other things). Can
> someone offer a pointer on where I can learn how to do things like this
> in .htaccess or config.php?
Try the following, at the very top of config.php (immediately after
the <?php, but before any other commands):
session_save_path('...path/to/tmp/dir...');
ini_set('session.gc_maxlifetime', 7200);
This may cause the sessions to hang around for two hours instead of
just 24 minutes. You'll know its working if the directory
specified in session_save_path starts filling up with temporary
session files (which PHP will automatically clear out).
Pm
More information about the pmwiki-users
mailing list