I used codeigniter 2.1.0 to develop and e-commerce site for a client. The site has been working well for about 3 months then all of a sudden, logins were not sticking, session data was not being set. I checked the database and noticed a new session was being created on every page load.
Here are my config value
$config['sess_cookie_name'] = 'myu';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = '_sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 3600;
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;
I edited the user_agent field on session table to accommodate long user_agent strings. What could be the problem? i'll be greatful for any help
Make sure you have correct domain set in /application/config/config.php
at $config['cookie_domain']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With