Verification code passed SessionID not read session

Source: Internet
Author: User

Today encountered a wonderful problem,,, backstage login verification code is always his sister's wrong


You know why??? I really find resources for half a day to find!!!


Altogether is because access to xxx.com/admin.php at this time into the login interface, verification code picture read success, but you find the input confidential, click on the login, always say the verification code is not correct, and then you go to output the verification code of the session,, the results found hehe,,, for the empty


Then you go to the temp file under the server TMP try to find the SessionID,,, you will find there,,, then why can't you read it??


Confused


This is because: xxx.com is a domain name you access the verification code of SessionID put to www.xxx.com,,, why put in www.xxx.com?? Because PHP configuration file Session.cookie_domain = default is empty, if it is empty, and put SessionID to the default domain name, the default domain name is the project bound domain name, so put under the www.xxx.com!


SessionID first-class domain name can not read the level two domain name of the SessionID, but vice versa!!


But the above problem, I use IE browser altogether can login,, ie no problem,, this is with the browser of some internal mechanism for a reason

Verification code passed SessionID not read session

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.