Welcome Guest, Not a member yet? Register   Sign In
lost sessions in plain CI 2.1.4 install
#1

[eluser]mlieshout[/eluser]
Hi,

I know this has been asked many, many times on this forum, but I keep losing sessions in a CI 2.1.4 website. The sessions gets destroyed in Session.php, when the session data getting back from $this->_unserialize($session) is no longer in the correct format.

To make sure it's not caused by the code I wrote, I've ran the same tests in a plain CI 2.1.4 download with these settings:

$config['sess_cookie_name'] = 'cisession';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent']= FALSE;
$config['sess_time_to_update'] = 300;

$config['cookie_prefix'] = "";
$config['cookie_domain'] = ".ci2";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;

$config['global_xss_filtering'] = TRUE;

$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';

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

The test is done with jMeter and simulates a number of 100 Threads (users). All it does is a GET on the index.php. It gives lots of dropped sessions.

I've searched the forum, tried several solutions (like base64_encode/base64_decode in the _unserialize() and _serialize() functions) but it keeps loosing sessions. So, I'm kind of stuck. Anyone knows a working solution for this problem?


Messages In This Thread
lost sessions in plain CI 2.1.4 install - by El Forum - 03-11-2014, 05:19 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 02:37 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 02:40 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 02:44 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 02:50 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 02:51 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 02:54 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-28-2014, 06:10 AM
lost sessions in plain CI 2.1.4 install - by El Forum - 04-29-2014, 08:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB