dqo58772 2013-08-27 14:53
浏览 95
已采纳

CodeIgniter会话超时问题

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…

The context is the following :

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.

Anyone has an idea ?

Thanks.

  • 写回答

1条回答 默认 最新

  • duanbaque4230 2013-10-05 06:31
    关注

    I think you have 2 ways to fix it.

    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/

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 请查询全国几个煤炭大省近十年的煤炭铁路及公路的货物周转量
  • ¥15 请帮我看看我这道c语言题到底漏了哪种情况吧!
  • ¥66 如何制作支付宝扫码跳转到发红包界面
  • ¥15 pnpm 下载element-plus
  • ¥15 解决编写PyDracula时遇到的问题
  • ¥15 有没有人能解决下这个问题吗,本人不会编程
  • ¥15 plotBAPC画图出错
  • ¥30 关于#opencv#的问题:使用大疆无人机拍摄水稻田间图像,拼接成tif图片,用什么方法可以识别并框选出水稻作物行
  • ¥15 Python卡尔曼滤波融合
  • ¥20 iOS绕地区网络检测