【问题标题】:Session still expired in CI3CI3 中的会话仍然过期
【发布时间】:2016-04-13 01:58:44
【问题描述】:

我使用 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,永不过期。

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

我在谷歌附近,但从未解决过问题。

欢迎提出任何建议。

谢谢。

【问题讨论】:

    标签: php apache codeigniter-3


    【解决方案1】:

    您的路径值设置为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!
    |
    */
    

    Docs.

    【讨论】:

      猜你喜欢
      • 2023-04-10
      • 1970-01-01
      • 2019-11-10
      • 2023-03-25
      • 1970-01-01
      • 1970-01-01
      • 2015-09-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多