CodeIgniter会话超时问题 [英] CodeIgniter session timeout issue

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

问题描述

我正在使用CI 2.1.4并设置

I’m using CI 2.1.4 and I set

$config['sess_expiration'] = 0;

但是有时候我在仪表板中时,网站会自动注销...

but sometime when I’m in my dashboard I’m unlogged automaticaly by the site…

上下文如下:

我在1个系统上使用2个应用程序,但是两个应用程序使用相同的加密密钥,会话表和相同的超时时间。

I’m using 2 applications for 1 system, but both applications use the same encryption key, session table and the same timeout.

当我提交表单然后在选择会话数据以将其添加到数据库中时出现此问题。

This problem appear when I submit a form then after I pick up session data to add it in the database.

每个人都有个主意吗?

谢谢。

推荐答案

我认为您有2种解决方法。

I think you have 2 ways to fix it.


  1. 首先,您应该 github 替换会话库文件夹以及下载的代码。

  2. 其次,您可以扩展会话库并检查AJAX请求,然后更新会话,因为您可以在下面有关此问题的讨论中看到此内容。 CodeIgniter官方论坛,它解释了解决该问题的方法: http://ellislab.com/forums/viewthread / 138823 /

  1. First, you should download latest code from github and replace session library folder with downloaded code.
  2. Second, you can extends the session library and check for AJAX request, then update the session as you can see this following discussion about this problem in CodeIgniter Official Forum, it explains to get rid of the problem: http://ellislab.com/forums/viewthread/138823/

注意:论坛位置已更改 http://ellislab.com/forums/ http ://forum.codeigniter.com ,很难在那里找到该主题。您可以搜索自己喜欢的内容,也可以按照#1进行操作。

Note: The forum location has changed http://ellislab.com/forums/ to http://forum.codeigniter.com and it is hard to find the topic there. You can search if you like or you can follow the #1.

希望它会对您有所帮助。

Hope it will helps you.

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

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