• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session does not expire? why?

#2
[eluser]sensimevanidus[/eluser]
When you open your browser and visit a site that attempts to start a new session, the server assigns you a new session id. When you close your browser, your current session ends and session cookies are automatically deleted; so is your session id. If you read "Session Class" part of CodeIgniter's user guide; you'll see that:
sess_time_to_update: This options controls how often the session class will regenerate itself and create a new session id. This has nothing to do with opening or closing the browser. Normally, one session is referenced by only one session id; but using CodeIgniter's session class, you can have different session ids for a session over time. Say your session was started 9 mins ago and "sess_time_to_update" is configured to 5 mins. In this situation, you'll not be using the session id that was created during your session's initialization. Instead, you'll be using the one that was re-created for your session 4 mins ago. Hope that was clear.
And also, the guide says that:
sess_expiration: The number of seconds you would like the session to last. The default value is 2 hours (7200 seconds). If you would like a non-expiring session set the value to zero: 0. Your "sess_expiration" is set to 0; so your session won't expire unless you close your browser.


Messages In This Thread
Session does not expire? why? - by El Forum - 10-15-2008, 08:22 AM
Session does not expire? why? - by El Forum - 10-15-2008, 10:28 AM
Session does not expire? why? - by El Forum - 10-15-2008, 10:35 AM
Session does not expire? why? - by El Forum - 10-15-2008, 10:43 AM
Session does not expire? why? - by El Forum - 10-15-2008, 10:48 AM
Session does not expire? why? - by El Forum - 10-15-2008, 10:51 AM
Session does not expire? why? - by El Forum - 10-15-2008, 11:13 AM
Session does not expire? why? - by El Forum - 10-16-2008, 01:04 AM
Session does not expire? why? - by El Forum - 10-16-2008, 01:16 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.