• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session lost after redirect on Heroku (but no on localhost) [fixed]

#1
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
Reply


Messages In This Thread
Session lost after redirect on Heroku (but no on localhost) [fixed] - by jfmcode - 12-09-2016, 09:00 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.