脚本宝典收集整理的这篇文章主要介绍了php – 在CodeIgniter 2.1.0的会话库中有没有已知的错误?为什么我被踢出来?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我注意到有时当我重新加载页面几次或打开几页非常快,或当我有代码错误(这些错误与会话无关)我已经注销.
该网站正在使用一个名为Ion_auth的库来进行标识:
public function LOGged_in() { $identity = $this->ci->config->item('identity','ion_auth'); return (bool) $this->ci->session->userdata($identity); }
有什么问题吗?
$config['sess_cookie_name'] = 'cisession'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = TRUE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'cisession'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300;
CodeIgniter的会话库中存在一个错误,它会以快速请求方式销毁会话.
在这里你可以找到更多关于这个bug:
https://github.COM/EllisLab/CodeIgniter/issues/154
这个bug仍然存在于2.1.3的最新的稳定版本中.
我已经通过将来自GitHub的CI3-DEV替换为我的会话库来修复此问题:
https://github.com/EllisLab/CodeIgniter/blob/b211adee89f5fd2192051e9c0826146bd150f469/system/libraries/Session.PHP
在我的配置中放一个长sess_expiration和sess_time_to_update …我的是86400和86500.
以上是脚本宝典为你收集整理的php – 在CodeIgniter 2.1.0的会话库中有没有已知的错误?为什么我被踢出来?全部内容,希望文章能够帮你解决php – 在CodeIgniter 2.1.0的会话库中有没有已知的错误?为什么我被踢出来?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。