![]() |
[SOLVED] Sessions not persisting over page loads - 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: [SOLVED] Sessions not persisting over page loads (/showthread.php?tid=27691) |
[SOLVED] Sessions not persisting over page loads - El Forum - 02-17-2010 [eluser]mikegioia[/eluser] Hi Guys - I'm really wracking my brain over this one. I have CI installed on numerous linux machines in a shared hosting/VPS hosting environment for years now. I'm testing out the application on a rackspace cloud debian instance and it's working except for the sessions. I'm able to write data to the session and read from it within the page but once I do a redirect all of the session information is dropped. From debugging I'm pretty sure it has to do with the session key expiring. I have sessions stored in the database and upon looking in the ci_sessions table all of that data is stored correctly. It just doesn't persist across page loads or page refreshes. Is there something I'm doing wrong here? Has anyone had any luck setting this up in a cloud environment or even a dedicated machine? I'm running it over the IP of the machine, it's not running on a domain right now, could this be the problem and should it be if it is? I'm grasping at straws on this one so any help or suggestions would be greatly appreciated. Mike [**UPDATE**] I had to set the IP address as the cookie_domain in the config file. 4 hours of rooting through CI libraries / running server configuration scripts and it was a simple config line edit. Ugh. [SOLVED] Sessions not persisting over page loads - El Forum - 02-17-2010 [eluser]JoostV[/eluser] Check if your server clock is set correctly, using Linux date function form the command line. If your server clock is not set correctly sessions will expire on every page load. [SOLVED] Sessions not persisting over page loads - El Forum - 02-17-2010 [eluser]mikegioia[/eluser] Thanks, JoostV. I'll give it a shot. |