Working on a new project in CodeIgniter I’ve found that when the sessions are saved in the database, they lost all the information that was stored in them when switching between controllers and doing simultaneous Ajax calls.
The solution was in CodeIgniter repository. It’s a bug from several versions ago and quite common among IC developers.
To solve the problem, for now, we must replace “system/libraries/Session.php” with Areson CI Session.php and save the session table with the following SQL script:
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, prevent_update int(10) DEFAULT NULL, PRIMARY KEY (session_id), KEY `last_activity_idx` (`last_activity`) );