The session cannot be passed. files can be saved, but mysql cannot.

Source: Internet
Author: User
The session cannot be passed, files can be saved, and mysql cannot save the verification code in the session. when files is used to save the session, the user can read the verification code at $ _ SESSION [captcha] in the background during registration, that is, the verification code can be passed normally. However, when the user uses mysql to save the session, sessions can be stored normally (in the database, we can see that sess sessions with captcha cannot be transferred, files can be saved, but mysql cannot be saved)
The verification code is saved in the session. when you use files to save the session, the user can read the verification code in the background $ _ SESSION ['captcha '] during registration, that is, the verification code can be passed normally, however, when mysql is used to save the session, the session can be normally stored (The session value of captcha can be seen in the database ), you can use $ _ SESSION ['captcha '] to read the value on the page where the verification code is generated, but the value cannot be read on another page after the user registers for the background, (that is to say, it cannot be passed.) it was okay a long time ago. but now I find that it cannot be passed. can anyone think of the reason?
------ Solution ----------------------

The reply was deleted by the administrator at 15:04:13.


------ Solution ----------------------
To prevent unexpected situations
The program should unconditionally load SessionHandler. php
The instantiated object and session_start () should be carried out in SessionHandler. php.
You also use the namespace, so you need to check for new fault points.

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.