CodeIgniter Forums

Full Version: session updates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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.

El Forum

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.