Re: Changing Session Timeout
| From: | Tijnema ! | Date: | Fri, 27 Apr 2007 18:47:40 +0000 |
| Subject: | Re: Changing Session Timeout | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254003@lists.php.net to get a copy of this message | ||
On 4/27/07, tedd <tedd@sperling.com> wrote:
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, teddUhm, ini_set would come before session_start right? when session start is executed, then the ini value would be read right? the order is probably the problem here.. Tijnema