Welcome Guest, Not a member yet? Register   Sign In
codeigniter sessions
#1

[eluser]Unknown[/eluser]
Does codeigniter 2 regenerates the session id every time it updates the session table in the database ?
if so, does codeigniter update the session_id in the cookie ?

The reason I am asking is that in a shopping cart that I built, some times when the user adds a lot of items - and that takes a lot of time - the cart suddenlly empties or losses items
#2

[eluser]WanWizard[/eluser]
The session class rotates the session_id by default every 300 seconds, set by the update parameter in the config. If that happens, the cookie is updated as well.

However, if you use Ajax to update your cart, you can run into the problem that rotation happens on an ajax call, in which case you might lose the session. This is a known bug, it's been there for years.

Search here for "is_ajax" and "sess_update" on how to disable this rotation on ajax calls.




Theme © iAndrew 2016 - Forum software by © MyBB