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

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

问题描述

我使用的是 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 会话消失错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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