Ask what causes the PHP session to be lost

Source: Internet
Author: User
Tags php session tmp folder
May I ask what causes the PHP session to be lost?
After successful login, set session, and then output session to see the session settings successfully.

But the jump after the output session is blank.

Server LINUX,APACHE,PHP5.
Before the program is completely normal, but the server power down after the restart is this

This session has been saved in the/tmp folder, but the page after the jump, then look at the value of this session is empty.
But on my native test, this problem does not occur. The system I used was windowxp, and there was a problem with the configuration. Or is it that some files are missing after the server restarts?
The cookie still exists, and the session is lost.


------Solution--------------------
if (Empty ($_session["UserName"]) and Empty ($_cookie["UserName"]))
------Solution--------------------
Is it a catalogue?
------Solution--------------------
Session_Start () cannot have any output in front of
  • 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.