代码点火器session_start无效

时间:2016-03-19 11:54:32

标签: codeigniter session

我有一个codeigniter网站,并且在过去的一天它遇到了一个没有任何代码修改的问题。它说:

A PHP Error was encountered
Severity: Warning
Message: session_start(): open(/tmp/sess_5f9c0f8499f8970f68b2d94c92621af6, O_RDWR) failed: No such file or directory (2)

虽然根目录中有/tmp

另外,我在搜索问题时在config.php中给出了这个。

$config['sess_driver'] = 'files';
$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']      = 7200;
$config['sess_save_path'] = BASEPATH . 'tmp/';
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']      = 'ci_sessions';
$config['sess_match_ip']        = TRUE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;

任何想法??

1 个答案:

答案 0 :(得分:0)

你错过了“BASEPATH”中的“/”吗?

示例“BASEPATH。”/ tmp /';