codeigniter session swapping on multiple request at the same time

Viewed 626

I am having an ecommerce website running in codeigniter. The sessions are working fine on normal case. The problem starts when, say for example if two users are there on my website and assume that they are logged in, and when they click any action like add to cart or proceed to checkout or place the order the same time the login sessions are swapped.

Could anyone please help me on this! I have searched a lot on this but couldn't find a good solution.

I am using the config file like this

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie']  = TRUE;
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

I won;t be able to use the sess_driver as database since it will affect my website performance i believe.

Thanks in advance!.

1 Answers
Related