• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sessions in Codeigniter gets changed during page load

#3
(09-27-2018, 08:46 AM)dave friend Wrote: It might be a bug, or it might be an implementation issue, or it might be a session and/or cookie configuration issue. Please show the related $config settings and your login code.

Hi,

Below is the configration used for my website.

// config.php

--snip--
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = BASEPATH.'sess/cache/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
--snip--

--snip--
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
--snip--


Below codes are used for creating session and destroying it after login/logout. 

// Create session after login 
 $this->session->set_userdata('employer_id', $data['id']);

// Destory session after logout
 $this->session->unset_userdata('employer_id');
Reply


Messages In This Thread
RE: Sessions in Codeigniter gets changed during page load - by gaustinv88 - 09-28-2018, 12:09 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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