• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI3 - Session not save

#1
Hello,

I have move an old project to new server and i have an problem with session on codeigniter 3.
My session is not save.
I use database for store my session.


I have remark that in my cookie my value change each time that i reload page, but my cookie is well inserted in database.


My config

PHP Code:
$config['base_url'] = 'https://192.168.1.35/';


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

$config['cookie_prefix']   '';
$config['cookie_domain']   '';
$config['cookie_path']     '/';
$config['cookie_secure']   false;
$config['cookie_httponly'] = false

My Code
PHP Code:
class Login extends MY_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->data['pageCourante'] = 'login';
        $this->layout->set_theme('login');
    }

    public function index()
    {
        $this->load->library('session');

        var_dump($this->session->userdata('test'));

        echo '<br>';

        $this->session->set_userdata('test'5645);

        var_dump($this->session->userdata('test'));
        exit();
    

Tanks for your help
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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