$ SESSION loss after PHP upgrade. To upgrade PHP from 5.3 to 5.4.16 for an internal system in the production environment, login cannot be found. when two pages on the server are redirected, upgrade PHP from 5.3 to 5.4.16 for an internal system not in the production environment
Login is not allowed after generation. when two pages on the server are redirected, $ SESSION is not obtained.
Sadly, I tried to find a solution on the internet and found various statements,
Check the browser cookie first. the cookie is available, and the sessionID can also be obtained normally.
Check the code again. The code is written normally. it starts with session_start and $ SESSION [XXX] = XXXX.
Never mind, it's time to go crazy
I remember, where does PHP store the session?
Tomcat can be serialized in the database, written to a local file, or simply stored in the memory.
By default, PHP is saved in a txt file. the saved path is session. save_path in PHP. ini.
Amitabha, after upgrading PHP, the system handed the ownership of session. save_path to root by default, instead of the user who is currently running PHP.
PHP does not have the permission to write the session into this path. of course, it will be lost.
FFFFuck dog day PHP !!!!
Login is not allowed after a shard is generated. when two pages on the server are redirected...