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

查看:29
本文介绍了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天全站免登陆