CodeIgniter session timeout issue

旧巷老猫 提交于 2019-12-10 11:43:20

问题


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:


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.



来源:https://stackoverflow.com/questions/18468866/codeigniter-session-timeout-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!