Session Time
Need some help. How do I set the session to time, lets say in 5 minutes and the redirect to another page after session times out?
Need some help. How do I set the session to time, lets say in 5 minutes and the redirect to another page after session times out?
You modify the session time out in the php.ini file. See the following for more information:
12812.htm
You could set the session.gc_maxlifetime to 5 and set the page to reload every 6 minutes;
<META HTTP-EQUIV="refresh" CONTENT="6">
I don't have access to the php.ini file.
I tried adding the following to the Helper_PHP.php page but it doesn't work. And Im trying to get it to redirect to the logout page.
<?php
ini_set('session.cookie_lifetime', '60');
ini_set('session.gc_maxlifetime', '60');
?>
You might find something that will help here:
How to change PHP parameters when you don't have access to php.ini
change-php-parameters.html
You can't really redirect to another page when the session times out literally, but if you know how long the session will last without timing out, then you can redirect to another page after that amount of time on a single page, which is essentially the same thing.
<body onLoad="setTimout('document.locaiton.href=\'redirectpage.php\',1000*60*5')" >
This would redirect you to a page after 5 minutes. If your session were also set to five minutes it would essentially redirect you after your session has timed out.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.