[pmwiki-users] Fixing short sessions
peter.brink at brinkdata.se
Fri Sep 22 09:21:28 CDT 2006
I have a problem with short sessions. My pmwiki version is 2.1.33 and I
use authuser. My webhost provider uses a load balancer to move visitors
to one of their clients websites to a new server if the first one goes
down. If a visitor is inactive for more than 10 min the load balancer
stops keeping track of the visitor's session. This means that I and the
editors of my wiki(s) must re-login every 10th min, which is rather
According to the webhost provider the solution to the problem is to
insert the following code snippet in the part of code of my application
(in this case PmWiki...) that manages sessions:
ini_alter("session.gc_maxlifetime", "3600"); //1 hour
ini_alter("session.cache_expire", "3600"); //1 hour
(The directory ~/public_html/data/sessions must of course be writable by
I rather not hack pmwiki.php, but I realize that I might have to.
The best solution would of course be to create a recipe but session
handling seems to me like it belongs to the core. I'm not 100% sure what
part of pmwiki.php to edit but one good candidate seems to be the
function SessionAuth (on line 1599 in pmwiki.php).
Does anyone has any suggestions on how I should proceed?
More information about the pmwiki-users