This topic is locked

Session Timeouts

8/23/2006 4:19:12 AM
PHPRunner General questions
S
scy author

Is it possible to extend the period before the "Your session has expired. Please login again." ?

J
Jane 8/23/2006

Hi,
sure, it's possible.

You need to alter session.cookie_lifetime PHP configuration option in php.ini file.

session.cookie_lifetime specifies the lifetime of the session in seconds.

The value 0 means "infinite".
If you don't have an access to php.ini file you can alter PHPRunner-created files.

Insert this line just before session_start() statement in each PHP file:

session_set_cookie_params(0);



The function argument has the same meaning as session.cookie_lifetime value.
Also you can use Template Editor to apply these changes to PHPRunner template files.

S
scy author 8/23/2006

Thanks for the info.

D
Dale 8/23/2006

I asked this question about a year ago. The answer supplied here is perfect for my needs, thankyou.
BUT, Am I creating any undesirable possibilities if I add the session_set_cookie_params(0); to all the templates that have a session start function.??
So, bottom line, is this a safe thing to do?

D
Dale 8/24/2006

Im sorry that I am so persistant with getting some advice about setting the session to infinite.
Ive been sifting through the volumes of info on the web about session timeouts and getting frustrated with my lack of experience to understand it all.
Basically I get the biggest issue is, a client logging in and having a set session timeout to infinite would allow any user of that computer to view the application as the session would be kept active. (this is not an issue for me).
Other comments warn about using up memory on the server. Does a server clear these sessions at any point.
So, again Im asking if anyone has had any bad experiences with using a infinite session timeout.

I dont want to modify the templates to only find out a week later it was not a good idea.
My phprunner app IS NOT a high volume user website. Only 1 to 10 users per site would access the app at any one time. It is not open to serve the internet community.
Some real experience in this area would be greatly appreciated. Am I setting myself up for any surprises by setting the session timeout to infinite.