[pmwiki-users] Stay logged in on a specific machine...

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 24 11:22:36 CST 2009

On Thu, Feb 19, 2009 at 01:51:30PM -0500, DaveG wrote:
> I think I have a solution to this -- I've not had to login for a while 
> now :)
> [...]
>    $EnableSessionPasswords = 1;
> # Unique session name for each wiki -- if no farms you could use 
> commented line
> #  session_name('MY_SESSION123');
>    session_name(str_replace('.','',$_SERVER['HTTP_HOST']));
>    ini_set('session.cookie_lifetime', 99999999);
>    ini_set('session.gc_maxlifetime', 99999999);
> Note, setting gc_maxlifetime *may* have consequences that are not 
> beneficial. However, I've not seen that when I've used this code.

Note that gc_maxlifetime has no effect if used on a host
where other PHP scripts (that aren't setting gc_maxlifetime or set
it to a smaller value) are maintaining session files.  

I consider this a serious bug in the PHP design, but the PHP folks
seem to have little inclination to fix it.

So the other piece that is needed here is to set a unique session
path for PmWiki to use that doesn't get mangled by other PHP scripts.


More information about the pmwiki-users mailing list