CodeIgniter Forums
Database and Session IDs - why changed them every 5 minutes? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Database and Session IDs - why changed them every 5 minutes? (/showthread.php?tid=20306)



Database and Session IDs - why changed them every 5 minutes? - El Forum - 07-05-2009

[eluser]deco10[/eluser]
Hi
I'm loving CI.

I want to keep track of a users session (Im using the default length). Every time they click a certain item, I want to store it in the data base so they can view it later.

I would use the session ID as they key - and possibly the time stamp to guarantee uniqueness. But if the sess ID changes, every thing goes to heck, if you get me.

How would you approach this?


Thanks!


Database and Session IDs - why changed them every 5 minutes? - El Forum - 07-05-2009

[eluser]stuffradio[/eluser]
You can extend the length of time the session stays alive. I believe it's in the config.php file.


Database and Session IDs - why changed them every 5 minutes? - El Forum - 07-05-2009

[eluser]Wuushu[/eluser]
I believe the re-generation of session id is a security "thing". Makes it less likely to succeed in re-using a session incase someone would get hold of yours through whatever means. I could be wrong. Smile