Codeigniter 3会话不适用于PHP 7.1.4 [英] Codeigniter 3 Session not working With PHP 7.1.4

查看:271
本文介绍了Codeigniter 3会话不适用于PHP 7.1.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Codeigniter 3 HMVC构建的应用程序.该应用程序在PHP 5.6版本上运行良好,但是将我的PHP版本升级到7.1.4后,我无法登录到我的应用程序中.经过全面检查后,我发现会话完全没有设置.

I have an application built with Codeigniter 3 HMVC.The application was working fine on PHP 5.6 version, But after upgrading my PHP version to 7.1.4 I was not able to log in into my application. After a complete checkup I found that session is not setting at all.

我将角色恢复为PHP 5.6,并且会话再次正常运行,同时切换到PHP 7.1.4,使会话不起作用"问题重新出现.

I role back to PHP 5.6 and session was working fine again while switching to PHP 7.1.4 bring the "session not working" issue back.

我尝试更改某些配置值,例如cookie前缀和cookie保存名称等,似乎没有任何解决办法.

I tried altering some config value like cookie prefix and cookie save name etc, nothing seems to fix it.

任何人都可以帮忙.

推荐答案

我发现问题与早期版本的Codeigniter 3有关,这是他们网站上已经报告的错误.基本的会话错误已修复:

I found that the issue is with some earlier version of Codeigniter 3 and this is a bug already reported in their website.The underlying session bug has been fixed on:

  • 3.1.2
  • 3.1.3
  • 3.1.4

因此在最新版本的Codeigniter 3中,不会发生此问题.

So in the latest version of Codeigniter 3 this issue doesn't happen.

如果您已经是错误版本的Codeigniter,请考虑使用最新版本的系统文件夹替换系统文件夹.撰写本文时,版本为3.1.6.

If you are already in a faulty version codeigniter consider replacing system folder with latest version's one. Version 3.1.6 at the time writing this.

这篇关于Codeigniter 3会话不适用于PHP 7.1.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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