Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that php programs always prompt for incorrect input of CAPTCHA code

Shulou Source: shulou.com Published: 2022-06-03 09:15:20 10月04日 Update

This article mainly explains the "how to solve the php program always prompt CAPTCHA input error", the explanation in the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "how to solve php procedures always prompt CAPTCHA input error" it!

Today, when I put a set of programs to another server to execute, I found that the login verification code in the background always shows whether it is entered correctly or not:

Incorrect input of CAPTCHA code

And then debug started.

Because the correct CAPTCHA result has been encrypted and saved in session, all the CAPTCHA used for input will be compared with the CAPTCHA in session to determine whether the CAPTCHA is entered incorrectly!

Since it always says: "CAPTCHA is entered incorrectly"

Indicates that there may be a problem saving the results in session. Then, session under dump, it is found that the result is null.

Solution: use phpinfo to view session information, find out the save path of session, and then set the write permission to it.

Note: remember to restart apache or iis

Thank you for your reading, the above is "how to solve the php program always prompt CAPTCHA input error" content, after the study of this article, I believe that how to solve the php program always prompt CAPTCHA input error this problem has a deeper understanding, the specific use of the need for everyone to practice verification. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Validation input programs prompts results learning content problems information methods background that is ideas situations articles times more servers permissions knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Redmi vpn Shulou Tech Info Apple