Hi I'm still at it, I've now found that I should probably be using:
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 1);
ini_set('session.gc_maxlifetime', 10800);
ini_set('session.cookie_lifetime', 0);
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
if (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] === 'on') {
ini_set('session.cookie_secure', 1);
}
However I'm finding, through the use of: echo "<p>",
get_cfg_var("session.gc_maxlifetime"), "</p>"; that the value for
session.gc_maxlifetime is not being reset to 10800 but remains at 1440, the
default. The other values, eg 'session.cookie_secure' are being reset
correctly?
Can anyone shed some light on this?
Thanks in advance
Richard
_____
From: [email protected] [mailto:[email protected]] On Behalf
Of Richard Lake
Sent: Saturday, 4 September 2010 1:09 a.m.
To: [email protected]
Subject: [phpug] Extending session Timeout
Hi,
I've got a php based CRM system that is used by real estate agents, by the
nature of their work they use the browser intermittently so frequently the
next time they want to use the application it has timed out.
I've googled until I'm blue in the face on this and cannot change the
timeout from the current (approx) 20 minutes.
I'm on a shared server, I have the following settings before initiating the
session and I've got a local session manager to capture the sessions in a
MySQL table.
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 1);
ini_set('session.gc_maxlifetime', 36000);
ini_set('session.cookie_lifetime', 36000);
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
I'm currently considering having a timer based ajax function that just does
a session update to keep the session alive, but from everything I've read I
should be able to change the session timeout time.
Can any body point me in the right direction?
Thanks in advance
Richard
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.851 / Virus Database: 271.1.1/3101 - Release Date: 09/03/10
06:50:00
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]