CodeIgniter Forums
session updates - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: session updates (/showthread.php?tid=6293)



session updates - El Forum - 02-21-2008

[eluser]sawatdee[/eluser]
Does anyone know why CodeIgniter changes the session_id every 5 minutes by default? Is there a security reason for this? If not, is there a way to make session_id remain the same and only regenerate a new one when the previous session has expired? I need to log some information for each session, but if the user reloads the page then the session_id changes and I can no longer identify what session it is.


session updates - El Forum - 06-23-2008

[eluser]mumrah[/eluser]
I had this same problem, blogged here.

Basically, CI regenerates the session id after sess_time_to_update has elapsed. The default is 300 seconds (5 mins).

The fix is to either comment out some code (see above link), or to change this value to match sess_expiration.

Cheers
-David