会话在CI3中仍然过期


Session still expired in CI3

我使用CI3框架和apache 2.6作为web服务器。

对于用户登录,我使用会话来保存用户登录数据。

配置文件中的以下会话设置;

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'usersessionx';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 0;
$config['sess_regenerate_destroy'] = FALSE;

如上所述,session_expiration被设置为从未过期的0。

问题是,我的一些用户的会话超时,当他们点击/导航到另一个页面时,会重定向到登录页面。

我在谷歌上搜索过,但从未解决过这个问题。

欢迎任何建议。

谢谢。

您的路径值设置为NULL

/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_save_path'
|
|   The location to save sessions to, driver dependent.
|
|   For the 'files' driver, it's a path to a writable directory.
|   WARNING: Only absolute paths are supported!
|
|   For the 'database' driver, it's a table name.
|   Please read up the manual for the format with other session drivers.
|
|   IMPORTANT: You are REQUIRED to set a valid save path!
|
*/

文档。