CodeIgniter会话消失Bug? [英] CodeIgniter Session Disappear Bug?

查看:139
本文介绍了CodeIgniter会话消失Bug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是CI 1.7.3,这里是我的设置:

I am using CI 1.7.3 and here are my settings:

$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']      = 0;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']      = 'sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']      = 300;

我无法想出导致会话过期的步骤,它看起来很随机,非常令人沮丧对于用户。

I cannot come up with steps that cause the session to expire, it just seems random and is very frustrating for users.

推荐答案

我有同样的问题。 CodeIgniter会话库中存在设计缺陷,导致在快速连续提交两个或多个请求(例如执行多个AJAX请求)时意外销毁会话。我提交了一个错误报告,详细解释如下: https://github.com/EllisLab / CodeIgniter / issues / 154

I have the same issue. There's a design flaw in the CodeIgniter sessions library that causes the accidental destruction of sessions when two or more requests are submitted in rapid succession (such as when performing several AJAX requests). I've submitted a bug report that explains in more detail here: https://github.com/EllisLab/CodeIgniter/issues/154

现在,您可以通过设置sess_use_database = FALSE来实现一种解决方法。希望有人马上解决此问题。

For now, you can implement a workaround by setting sess_use_database = FALSE. Hopefully someone resolves this issue soon.

这篇关于CodeIgniter会话消失Bug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆