Welcome Guest, Not a member yet? Register   Sign In
Losing session user_data randomly
#1

[eluser]Unknown[/eluser]
I've searched through these forums pretty extensively but haven't managed to find something that's exactly the same as my problem or that helps me fix it.

I'm running into an issue where I'm losing the information stored in the user_data column of my db for the current session.

The flow is this;

User attempts to log in ->
Controller updates the session via Ajax call and responds to the calling page ->
If the log in was successful then javascript redirects to the 'logged in' page.

The problem I'm having is about 1 in 5 times this flow happens, the user ends up at the logged in page but with no data set in the user_data for the session - which essentially makes that user logged out even after successfully logging in.

This is not an issue due to underscores in the session cookie name (there aren't), it's not limited to a single browser (seen in FF, IE and Safari independently).

I implemented logging in the controller that's called for signing in and the page that's redirected to. The logging happens at the end of the sign in controller and the beginning of the redirected page's controller.

The logging shows that session_id, ip_address, user_agent, last_activity all stay consistent. The user_data that is logged at the end of the sign in controller is lost after the redirect (the data is empty).

This problem does not happen every time. I can log in 10 times in a row succesfully then randomly twice in a row it will fail. Like I said... maybe 1 in 5 is the average failure rate.

Any ideas? I'm sure it's something glaringly obvious but I really don't know where the session data could be being reset since I don't know what's happening between the two steps server side (ending one controller, then being redirected to a new one through javascript on the front end).

Thanks for any input!


Messages In This Thread
Losing session user_data randomly - by El Forum - 10-07-2010, 09:43 PM
Losing session user_data randomly - by El Forum - 10-07-2010, 11:30 PM
Losing session user_data randomly - by El Forum - 10-08-2010, 12:12 AM
Losing session user_data randomly - by El Forum - 10-08-2010, 01:34 AM
Losing session user_data randomly - by El Forum - 10-26-2010, 08:34 PM
Losing session user_data randomly - by El Forum - 11-04-2010, 02:49 AM
Losing session user_data randomly - by El Forum - 11-04-2010, 04:50 AM
Losing session user_data randomly - by El Forum - 11-04-2010, 05:33 AM
Losing session user_data randomly - by El Forum - 11-04-2010, 10:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB