Ask what causes PHPSESSION loss

Source: Internet
Author: User
Tags php session tmp folder
What causes PHPSESSION loss? After successful login, set the session, and output the session to see that the session is successfully set. & Nbsp; but the output session after the jump is blank. & Nbsp; what causes php session loss in linux, apache, and php5?
After successful login, set the session, and output the session to see that the session is successfully set.

However, after the jump, the output session is blank.

Linux, apache, and php5.
Previously, the program was completely normal, but the server was restarted after power failure.

This Session has been saved in the/tmp folder, but the value of this Session is blank after the page jump.
However, this problem does not occur when testing on my local machine. My system is WindowXP. Is there any problem with the configuration. Or are some files lost after the server is restarted?
The Cookie still exists, that is, the session is lost.


------ Solution --------------------
If (empty ($ _ SESSION ["UserName"]) and empty ($ _ COOKIE ["UserName"])
------ Solution --------------------
Is it a directory?
------ Solution --------------------
Session_start () cannot have any output

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.