CodeIgniter Forums
Sessions Class initializing twice - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter Archived (from EllisLab) (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Sessions Class initializing twice (/thread-54164.html)



Sessions Class initializing twice - El Forum - 08-26-2012

[eluser]Unknown[/eluser]
Hey,

I've found the on my site sometimes sessions expire randomly. After further looking into this I've found the cause to be when the session class gets initializing twice, randomly in one page load. When this happens the cookie it gets to check if your current session is active can sometimes be the old session ID and causes your current session to expire but keeps your old session alive in the database. I was wondering if any of you know what would cause the session class to be started up twice?

Thanks for any help and I know there are topics about the sessions not working but this is for a specific point with the class.