Re: Changing Session Timeout

From: Date: Fri, 27 Apr 2007 18:37:30 +0000
Subject: Re: Changing Session Timeout
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-254002@lists.php.net to get a copy of this message
At 12:26 PM -0500 4/27/07, Aaron Axelsen wrote:
With the following set, its still timing me out. I logged in and waited about 40 minutes, and it was timed out by then. This is getting very confusing, what else could it be that is causing this to not work? session_name('myapp'); $mytimeout = 180 * 60; // minutes * 60 session_set_cookie_params($mytimeout); $sessdir = ini_get('session.save_path')."/myapp"; if (!is_dir($sessdir)) { mkdir($sessdir, 0777); } ini_set('session.save_path', $sessdir); // New Attempt session_cache_limiter(); session_cache_expire($mytimeout / 60); ini_set('session.gc_maxlifetime', $mytimeout); #ini_set('session.gc_probability',1); #ini_set('session.gc_divisor',1); session_start();
The above is not the order of your code, is it? If so, move session_start(); to the top, namely the first line of code. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#254002) next »