CodeIgniter with Ion AUTH login not remembered CodeIgniter with Ion AUTH login not remembered codeigniter codeigniter

CodeIgniter with Ion AUTH login not remembered


I can see that you answered the problem yourself, but to add a solution to make it easier to find for others with the same problem, I have added it here with some more explanation for why it is the solution.

Your Full code:

$config['sess_cookie_name']     = 'pyrocms' . (ENVIRONMENT !== 'production' ? '_' . ENVIRONMENT : '');$config['sess_expiration']      = 0;$config['sess_expire_on_close'] = TRUE;$config['sess_encrypt_cookie']  = TRUE;$config['sess_use_database']    = TRUE;$config['sess_table_name']      = 'default_ci_sessions';$config['sess_match_ip']        = TRUE;$config['sess_match_useragent'] = TRUE;$config['sess_time_to_update']  = 300;//Added code to fix issue $config['cookie_prefix']    = "";$config['cookie_domain']    = "";$config['cookie_path']      = "/";
  • $config['cookie_prefix'] Sets a prefix if you need to avoidcollisions
  • $config['cookie_domain']; Set to .your-domain.com forsite-wide cookies
  • $config['cookie_path']; Typically will be aforward slash

setting each equal to "" pretty much makes sure that cookies are set for the entire domain.