By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Can I change session timeout intervals?

P: 8
Hi Everybody.
The problem is... my site is redirecting to Login page when i do nothing in my page (keeping it idle) for about 20-25 mins.
What is the Default timeout period for sessions?.
May 30 '07 #1
Share this Question
Share on Google+
4 Replies


ak1dnar
Expert 100+
P: 1,584
Hi Everybody.
The problem is... my site is redirecting to Login page when i do nothing in my page (keeping it idle) for about 20-25 mins.
What is the Default timeout period for sessions?.
Try to find out these lines from your php.ini file. and change the value to increase the session time out.make sure to restart the machine if you need to test.

Expand|Select|Wrap|Line Numbers
  1. ; After this number of seconds, stored data will be seen as 'garbage' and
  2. ; cleaned up by the garbage collection process.
  3. session.gc_maxlifetime = 1440
May 30 '07 #2

pbmods
Expert 5K+
P: 5,821
What is the Default timeout period for sessions?.
PHP does run garbage collection on session files every 1440 seconds*, so that might be why you're having difficulties. This can be changed by setting session.gc_maxlifetime in your php.ini file.

*this is technically an oversimplification. Actually, the garbage collection process is run approximately 1% of the time whenever a page is loaded (configurable in php.ini), and it will remove all session files that have a modification date older than session.gc_maxlifetime seconds ago.
May 30 '07 #3

pbmods
Expert 5K+
P: 5,821
You posted this in the PHP articles section (despite a HUMONGOUS sign that said DO NOT POST QUESTIONS HERE).

I'm moving it to PHP forums and merging it with your cross-post.
May 30 '07 #4

P: 1
Hi Everybody.
The problem is... my site is redirecting to Login page when i do nothing in my page (keeping it idle) for about 20-25 mins.
What is the Default timeout period for sessions?.

hey hieee..
in my site i want that page should redirect to homepage when i do nothing in that page (idle) but session dosent get expired...
can u plzz send me the logic of ur code where u get redirected to another page

thanks
Feb 20 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.