I'm using
Code Igniter 3.0.6 and the
files driver for
sessions.
When testing on
localhost everything works fine. But when I upload the site to
Heroku, the session is lost after every redirect.
I have reproduced the error on several browsers (Chrome, Firefox and Edge)
Using the Chrome dev tools I have notice that:
- In the localhost site, the cookie's value remains constant.
- While in the Heroku site, the cookie's value changes every time that I refresh the site.
Do you know what might be happening?
(what makes this error more frustrating is that the site used to work fine on Heroku, but one day the sessions stopped working; I have submitted older versions of the site, which used to work fine, with no success)
My configuration is the following:
PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;