Session lost after redirect in Codeigniter

前端 未结 13 2422
清歌不尽
清歌不尽 2021-02-05 06:39

I\'m using codeigniter as a framework.

Firstly, I use localhost but when I change to my IP address the login function doesn\'t work anymore. I found that th

13条回答
  •  情歌与酒
    2021-02-05 07:07

    I have the exact same problem and here's what I do. First, go to file system/libraries/Session/Session.php. Comment session_start(); on line 140. On function _configure, comment few lines under // Security is king

    //      ini_set('session.use_trans_sid', 0);
    //      ini_set('session.use_strict_mode', 1);
    //      ini_set('session.use_cookies', 1);
    //      ini_set('session.use_only_cookies', 1);
    //      ini_set('session.hash_function', 1);
    //      ini_set('session.hash_bits_per_character', 4);
    

    Second, go to file index.php on your root project. Put, session_start(); below

    Hope this helps.

提交回复
热议问题