CodeIgniter session class not working in Chrome

前端 未结 10 1618
别那么骄傲
别那么骄傲 2020-12-01 13:36

I have created a login system in codeigniter project, which is working fine in Firefox but doesn\'t work in Chrome, data fetch and set for session but when this code redirec

10条回答
  •  失恋的感觉
    2020-12-01 13:54

    I encountered the same problem in and finally manage to solve it by updating the sessions database table with the sql structure from the latest version of Codeigniter at this time, version 2.1.4.

        CREATE TABLE IF NOT EXISTS  `ci_sessions` (
             session_id varchar(40) DEFAULT '0' NOT NULL,
             ip_address varchar(45) DEFAULT '0' NOT NULL,
             user_agent varchar(120) NOT NULL,
             last_activity int(10) unsigned DEFAULT 0 NOT NULL,
             user_data text NOT NULL,
             PRIMARY KEY (session_id),
             KEY `last_activity_idx` (`last_activity`)
        );
    

    Also note that if you have multiple databases configured in the config/database.php, the session table using the the session table of the default configuration's databse.

提交回复
热议问题