I am using Codeigniter 3.1.11 on my localhost with XAMPP PHP version 7.3.11. I am using database sessions, not file.
I wrote some simple code to put user cart data into the session. On the initial form submission, the data is put in the session and looks good. One refresh, the session is regenerated and the prior session data is not there in the new session but is still there in an old session. Below are my config settings. I tried many combinations and cannot figure out the issue.
The initial session data looks good:
Array
(
[__ci_last_regenerate] => 1576165611
[CART] => Array
(
[0] => Array
(
[product_id] => XYZ1234567
[qty] => 1
)
)
)
On page refresh, I echo $this->Session->all_userdata() and I receive:
Array
(
[__ci_last_regenerate] => 1576124405
)
Each refresh generates a new number.
Config settings
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_sessions';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['cookie_prefix'] = 'card_';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
I will PayPal $10 to whoever provides a working resolution.