Buka file Config.php di folder Config, sesuaikan code lama dengan code ini
$config['sess_driver'] = 'database';
$config['sess_save_path'] = 'ci_sessions';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 604800;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
dan buat tabel ini
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`session_id` varchar(40) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`user_agent` varchar(120) NOT NULL,
`last_activity` int(10) unsigned NOT NULL,
`user_data` text NOT NULL,
PRIMARY KEY (`session_id`),
KEY `last_activity_idx` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
0 comments:
Post a Comment