Welcome Guest, Not a member yet? Register   Sign In
session data lost after redirect in CI 3
#1

hi ,
i using CI 3 ,
When I login, in login page i set user info in  session by set_userdata  ,
after set session redirect page To other controller but the session data which i set , was be destroyed

this is my session config

$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

and also my session library is auto load ,
and i created ci_session table
by this code

CREATE TABLE IF NOT EXISTS `ci_sessions` (
      `id` varchar(40) NOT NULL,
      `ip_address` varchar(45) NOT NULL,
      `timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
      `data` blob NOT NULL,
      KEY `ci_sessions_timestamp` (`timestamp`)
);

when i set session insert row in  this table  but when I print_r ($_SESSION )
i see just  [ __ci_last_regenerate ] => 1453970104
#2

Don't double post.




Theme © iAndrew 2016 - Forum software by © MyBB