Welcome Guest, Not a member yet? Register   Sign In
Session lost after redirect on Heroku (but no on localhost) [fixed]
#4

(12-09-2016, 09:44 AM)jfmcode Wrote: Sorry, I did not noticed the last line of the config.php file: 
PHP Code:
$config['sess_save_path'] = sys_get_temp_dir(); 

sys_get_temp_dir() is not appropriate for this, unless you are the only user on that server.

(12-09-2016, 09:44 AM)jfmcode Wrote: However, I have just tried changing the session drive to database, and the session is still being lost.
So I think the issue is related to the ci_session cookie being changed each time that the page is reloaded.


These things are related ... having a wrongly configured save_path WILL result in the cookie being regenerated.

There's no silver bullet here. If there was a set of config values that would make it work everywhere, you wouldn't have the option to configure it in the first place. You need to know your environment and configure your application for it.
Reply


Messages In This Thread
RE: Cookie-based session lost after redirect on Heroku (but no on localhost) - by Narf - 12-09-2016, 11:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB