Hi,
I know this question has been asked time and time again but i simply can't get my session's lifetime to go beyond the default of 24min.
Does anyone know a simple way of increasing or decreasin the session lifetime?
Thanks.
Simple session lifetime
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Simple session lifetime
have you tried changing the session.gc_maxlifetime value in php.ini?
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Simple session lifetime
i'm afraid i don't have access to php.ini.
However, would this change work?
Also, is there a way of setting the session lifetime based on a request? i.e. setting it by entering a value in a text box.
Thanks for your prompt response.
However, would this change work?
Also, is there a way of setting the session lifetime based on a request? i.e. setting it by entering a value in a text box.
Thanks for your prompt response.
Re: Simple session lifetime
Its possible to change the session.gc_maxlifetime
by ini_set('session.gc_maxlifetime', $garbage_timeout);. you have to set the timeout values in seconds
I think this will solve that problem.But I was not tested.
by ini_set('session.gc_maxlifetime', $garbage_timeout);. you have to set the timeout values in seconds
I think this will solve that problem.But I was not tested.
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Simple session lifetime
I will give this a go.
Thanks.
Thanks.
Re: Simple session lifetime
Unfortunately, garbage collection of old sessions uses the value in php.ini, not whatever you set via ini_set(). The only way to change this value is by modifying php.ini.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: Simple session lifetime
Any Possible way to modify the php.ini file through programming.
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Simple session lifetime
This was also part of my initial point.vinoth wrote:Any Possible way to modify the php.ini file through programming.