views:

69

answers:

1

Ive got a site that does a few ajax calls on page load, now for some reason, codeIgnitor is inserting 4 sessions (I'm assuming for each ajax call) as you load the page. I'm storing the sessions in the database.

I'm pretty sure there should only be one session per browser? FF seems to only generate one, other browsers seem to create a whole bunch of sessions.

Multiple sessions for the same user are giving me some serious authentication problems.

any ideas?

A: 

Check your config.php file and make sure the cookie options are properly filled out. If they are not it cant track the user and it will gen a new session on every page load.

Tom Schlick
$config['sess_cookie_name'] = 'ci_session';$config['sess_expiration'] = 3600;$config['sess_encrypt_cookie'] = FALSE;$config['sess_use_database'] = TRUE;$config['sess_table_name'] = 'ci_sessions';$config['sess_match_ip'] = TRUE;$config['sess_match_useragent'] = TRUE;$config['sess_time_to_update'] = 300;
Derrick
Multiple sessions only occur in safari, IE8, have not checked with chrome yet. FF produces a single session entry.
Derrick