PHPSession: Two session files are generated when an account logs in.

Source: Internet
Author: User
Today, I found the Login program written the day before yesterday. After logging on, the page jumps back to Login. php, found that under the Session file storage directory every account login will generate two session files, one with data, one with no data, resulting in the program did not get the login name jump back to the login page, want to ask PHP... today, I found the login program that was written the day before yesterday and jumped back to the page after login Login.phpIn the Session file storage directory, each account will generate two session files, one with data and the other without data. As a result, the program will not get the login name and jump back to the logon page, is the PHP session configuration incorrect?

PHP. ini session only configures the following

session.save_path = "D:/www/tmp"session.use_cookies = 1session.auto_start = 0

session.auto_startSet Automatic startup, but still unchanged

Reply content:

Today, I found the login program that was written the day before yesterday and jumped back to the page after loginLogin.phpIn the Session file storage directory, each account will generate two session files, one with data and the other without data. As a result, the program will not get the login name and jump back to the logon page, is the PHP session configuration incorrect?

PHP. ini session only configures the following

session.save_path = "D:/www/tmp"session.use_cookies = 1session.auto_start = 0

session.auto_startSet Automatic startup, but still unchanged

You have not solved this problem. I have also encountered this problem.

Check whether the Cookie is generated on the page?
session.use_only_cookies = 1

Check whether session_name () is called. This function may generate two session files.

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.