sandhya01
asked on
Idle timeout in Apache/php
Hi experts,
How should i implement the idle timeout functionality in my php pages. I want to set a centralized idle timeout setting. Instead of setting it in all php pages, is there any way i can do it in a centralized manner. The php pages are deployed in apache server.
I want the idle time out to be set as 30min.
Thanks
How should i implement the idle timeout functionality in my php pages. I want to set a centralized idle timeout setting. Instead of setting it in all php pages, is there any way i can do it in a centralized manner. The php pages are deployed in apache server.
I want the idle time out to be set as 30min.
Thanks
What do you want to make happen after the 30 minutes?
ASKER
I want it to get redirected to my logout.php page.
Is there something that can be done in .htaccess or php.ini file, as i am interested in providing a centralized idle time out setting.
Is there something that can be done in .htaccess or php.ini file, as i am interested in providing a centralized idle time out setting.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi
I have created a logout.php page seperately, that handles all my session related variables and cookies.
so by including this in all the page:
$logout_url = 'http://'.$_SERVER['HTTP_HOST'].'/logout.ph p';
header( "refresh: 1800; url=$logout_url");
I am able to provide the idle time out feature in my php pages.
What you all think of the above code, is it fine to do like this/
Thanks
I have created a logout.php page seperately, that handles all my session related variables and cookies.
so by including this in all the page:
$logout_url = 'http://'.$_SERVER['HTTP_HOST'].'/logout.ph
header( "refresh: 1800; url=$logout_url");
I am able to provide the idle time out feature in my php pages.
What you all think of the above code, is it fine to do like this/
Thanks
I think that would work. It does the same thing as the <meta> tag - tells the browser to start a clock and where to go when the clock expires.
Either way, meta or header, the refresh IS GOING TO OCCUR when the clock expires, even if the cleint is still typing.
Best regard, ~Ray
Either way, meta or header, the refresh IS GOING TO OCCUR when the clock expires, even if the cleint is still typing.
Best regard, ~Ray
ASKER
The answer were good but I had a better solultion to the questions, which even was accepted by the Experts. Even though, I express thanks to everyone who tried to help me.
Thanks
Thanks
sandhya01: For the benefit of others, would you please post your solution? Thanks. ~Ray