Welcome Guest, Not a member yet? Register   Sign In
Dropped Sessions
#1

[eluser]theseamusjames[/eluser]
We have a rather massive application built on the CodeIgniter framework, and we're having an issue with sessions.

Our login sessions keep disappearing when users are adding content to our site. We have an extremely comprehensive calendar of cycling events, and when our users add an event, it occasionally loses the session data.

Our config.php session settings:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;

When adding events, we store the data for the event in a session as we move between the form and the preview screens, and from the preview to the actual entry.We had run into some issues with the amount of data we're storing in the session being too large, so we changed the user_data field to 'longtext,' which solved some of our issues with sessions dropping. Still, occasionally even very simple events with only a small amount of data (far, far below the limit of a longtext field - all the data is text), we're losing our sessions.

Any ideas about how we might go about troubleshooting this?
#2

[eluser]dudeami0[/eluser]
This is a known bug in codeigniter, with a few workarounds in the forums. It has to do with concurrent requests invalidating the sessions, which just destroys the session. If you don't mind the loss of security, uping the sess_time_to_update to a larger number (Like a month, year, something ridiculous) works to, though is not advised. Look around the forums for the workaround.
#3

[eluser]theseamusjames[/eluser]
Thanks. I saw some posts but they were old, so I thought I'd try a new one. In this particular case, security isn't crucial as none of the information is particularly sensitive. (Accounts only allow people to save dates to a calendar and create events, which are public information anyway).




Theme © iAndrew 2016 - Forum software by © MyBB