• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session variable not working in other controller

#1
I set a session variable in my login controller after successful login. When I check for the variable in my dashboard controller no session data is found.
When I check the session in the login controller, session data exists. It does not exist when I check the dashboard controller. I have also tried using database sessions but same problem occur here.
I am using CodeIgniter 3.1.3 with HMVC (Module Based MX Controller) and use some other library PHPMailer DomPDF (Both are loaded by autoload.php). Both library are work fine. I have checked in Database, Many times I have found 2 different session ID generated in other controller in the same time after 5 min it has been changed. When my computer has restarted or cookie deleted, then works fine, after sometime this problem has occur.
I have checked session with $_SESSION, $this->sesssion->all_userdata(), $this->session->userdata; both output are different in different controller.
I have load session library in autoload.php created and updated by composer.


My Config File for Session
================
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = APPPATH . 'cache/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;


Attached Files Thumbnail(s)
               
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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