Click to See Complete Forum and Search --> : PHP Page Session timeout?


GUIR
04-22-2008, 02:24 AM
Hi!

Can someone please let me know how to do,

Automated PHP Page session expiration after a certain idle time (which user doesn't interact with web page)

This is actually to protect an application from unauthorized access after leaving browser open without logging out.

I guess I have to do this with SESSIONS; but could not find a solution.

Thanks and Best Regards

salmanshafiq
04-22-2008, 03:54 AM
Hello,

You could try adding these lines:

ini_set('session.cookie_lifetime', 0);
ini_set('session.gc_maxlifetime', 3600);

You should add them at the start of every page, or in the connection file since it will most probably included in all pages, and also appears before the session is started.

However, depending on your settings, this might not work.