Website is unable to properly retrieve session information after PHP update

走远了吗. 提交于 2019-12-02 06:26:23

问题


I had some very simple code on a website to handle logins on the root of the site using ion_auth:

if(!$this->ion_auth->logged_in())
{
   redirect("/login");
}

That page posts to /auth/login, which is handled by ion_auth. If the login is successful, the user is redirected to the root of the site. Otherwise, they go back to /login to try again. I initially thought I'd forgotten the password, but with a series of var_dump() calls, I found that the login is successful, but the call to $this->ion_auth->logged_in() returns false anyway.

All of this is after the host upgraded to PHP 7 - the code worked before. I've tried upgrading ion_auth, but it didn't help.


回答1:


There were session related problems in early CI 3.x version, documented here and here

several session related issues were resolved in the latest versions, see the change logs

solution: update to CI 3.1.7. (latest version as writing)

Upgrading From a Previous Version



来源:https://stackoverflow.com/questions/48643070/website-is-unable-to-properly-retrieve-session-information-after-php-update

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