我有保存會話介紹數據庫的問題Codeigniter不希望將會話寫入數據庫。codeigniter 2.2.6會話到數據庫
我autoload.php
$autoload['libraries'] = array('session','database');
我的config.php
$config['sess_cookie_name'] = 'ci_session';
$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'] = TRUE;
$config['sess_time_to_update'] = 300;
我的表
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`)
);
誰能幫助我?
使用任何前綴?? – devpro
編號$ config ['cookie_prefix'] \t =「」; $ config ['cookie_domain'] \t =「」; $ config ['cookie_path'] \t \t =「/」; $ config ['cookie_secure'] \t = FALSE;我使用Ubuntu 14 – Vlada
只是'FALSE'的'$配置[ 'sess_match_useragent']' – devpro