Home > Backend Development > PHP Problem > php verification code prompt error

php verification code prompt error

王林
Release: 2023-02-24 08:24:01
Original
3352 people have browsed it

php verification code prompt error

Question: After the new server is configured, the php website is deployed. The website opens and displays normally, but the user is always prompted with a verification code error when logging in. (Correct verification code entered)

Cause analysis:

1. Session problem

In session I didn’t remember the verification code. It should be a permission issue with the session folder of PHP.

Processing method:

php-fpm mode
Modify the startup user of php-fpm
session folder is /var/lib/php/ session

vi /etc/php-fpm.d/www.conf
Change the user and user group to apache
user =apache
group =apache
or change Permission to modify the session file according to the user of php-fpm

2. Time zone setting problem

php does not set the correct time zone, resulting in abnormal time judgment.

Processing method:

a. Add the time zone setting date_default_timezone_set('PRC');

b. Modify the php.ini setting in the php code Default time zone date.timezone = PRC;

The above content is for reference only!

Recommended tutorial: PHP video tutorial

The above is the detailed content of php verification code prompt error. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template