CodeIgniter Forums
Session userdata disappearing after session updates - 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: Session userdata disappearing after session updates (/showthread.php?tid=9170)



Session userdata disappearing after session updates - El Forum - 06-15-2008

[eluser]Unknown[/eluser]
Hi,

My session user data seems to be disappearing every time the session refreshes. My application has a login page that sets an is_logged_in variable in the session. All pages (and ajax pages) verify that the user is logged or redirects to the main page. When the session refreshes the is_logged_in variable is lost. Why is this? Note that the session is not expired, just refreshing.

Just in case it matter, this is occurring in safari.

thanks,
Jeff


Session userdata disappearing after session updates - El Forum - 07-17-2008

[eluser]StevenW721[/eluser]
What are your other session preferences set to?

I think I'm getting a similar issue but it's only happening on a clients computer running IE6. I can't seem to replicate the issue from here even with IE6. Could it be anything to do with their network?

Here's our session preferences...
Code:
$config['sess_cookie_name']       = 'int_session';
$config['sess_expiration']        = 28800; //8 hours
$config['sess_encrypt_cookie']    = TRUE;
$config['sess_use_database']      = TRUE;
$config['sess_table_name']        = 'int_sessions';
$config['sess_match_ip']          = TRUE;
$config['sess_match_useragent']   = TRUE;
$config['sess_time_to_update']    = 300;

Originally we had the sess_time_to_update set to 30 and the sess_expiration set to 2 hours but after hearing they were having issues I reverted back to the default 300 for the update and bumped the expiration to 8 hours to see what that did. Still there's an issue with them losing the session data.


Session userdata disappearing after session updates - El Forum - 12-04-2008

[eluser]Ricardo Rodrigues[/eluser]
My session userdata suddenlly started to disappear when switching controllers/views.

I moved to CI 1.7

Any thoughts about this?

Thanks


Session userdata disappearing after session updates - El Forum - 12-04-2008

[eluser]Ty Bex[/eluser]
What authentication application are you using. I had the same problem when using FreakAuth. I just got fed up and I am writing my own authentication application


Session userdata disappearing after session updates - El Forum - 12-04-2008

[eluser]Ricardo Rodrigues[/eluser]
I'm not using any Authentication libray just my own control.

I have a Login form in which the control is made. If I made the view reload itself, I have all session userdata but if I redirect to main view, it looses it.

I'm 3 hours debuging this and found that is the DB check that is failing and making session to destroy. Why it fail....

I disable the reset in the Session library but the userdata is missing!


Session userdata disappearing after session updates - El Forum - 12-04-2008

[eluser]Ricardo Rodrigues[/eluser]
just for info: If I disable the use of the database by the session library, all is working...