Friday, April 16, 2004, 4:35:30 PM, you wrote:

> Hello Marek,


>    I had similar trouble with my PHP application. I used an .htaccess
> file with the same line. But it still did not work. I guess I even tried
> ini_set() function.

> I have a question with this point :

I can only answer part of it:

>> 2. No other application can access your session storage. Other
>> applications could have shorter session lifetime, and the shortest 
>> would apply for all other applications.

If you have your own session_save_path('/my/session/path') and make
sure no other application writes to the same one those sessions are
'safe' and in theory cou can have any session timeout you want. (same
argument, rephrased)

> Does it mean that the shortest session lifetime associated with an
> application applies to all other applications in the domain ?

yes,

The reason for this is that the session garbage collector gets called
with a certain (configurable) probability that will remove any files
older than TTL in that directory - automagically invalidating any
session ids having been inactive - no file to validate against.


> Has anyone been able to get the session_life to last atleast a couple
> of hours // my appl logs the user out after about 30 mins

I can't confirm on having longer session timeouts as I didn't really
care / had the need to...


> Thanks in advance
> Pushpinder Singh

Richard


> On Friday, April 16, 2004, at 08:54 AM, Marek Kilimajer wrote:

>> pete M wrote:
>>
>>> Am trying to increae the session lifetime to 8 hours ish
>>> using this code
>>> ini_set('session.gc_maxlifetime',28800);
>>> does not work ?
>>> any ideas
>>> Pete
>>
>> There are 3 conditions that must be met:
>>
>> 1. You must set it before session_start()
>>
>> 2. No other application can access your session storage. Other 
>> applications could have shorter session lifetime, and the shortest 
>> would apply for all other applications.
>>
>> 3. The session cookie must live long enough. The default lifetime for
>> session cookie is 0, that means untill the browser closes.
>>
>> HTH
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to