$ SESSION loss after PHP upgrade _ PHP Tutorial

Source: Internet
Author: User
$ 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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.