Fatal error: session_start(): Failed to initialize storage module: user (path: )
解決方法1:
開啟CodeIgniter設定檔,預設再 application/config/config.php
把:
$config['sess_save_path'] = NULL;
改成:
$config['sess_save_path'] = BASEPATH . 'yourfoldername/cache/';
解決方法2:
改用 DB session ,必須先連接資料庫,起設定好資料庫連線資訊
開啟CodeIgniter設定檔,預設再 application/config/config.php
把
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
改成
$config['sess_driver'] = 'database';
$config['sess_save_path'] = 'ci_sessions';
匯入資料表
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`id` varchar(128) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
`data` blob NOT NULL,
KEY `ci_sessions_timestamp` (`timestamp`)
);