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

php verification code error prompt

王林
Release: 2023-02-25 15:08:01
Original
3386 people have browsed it

php verification code error prompt

Enter the correct verification code, but the PHP program prompts the wrong solution

Cause analysis

##1、session

The verification code is not remembered in the session. This should be a permission issue with the session folder of PHP.

Processing method:

php-fpm模式的
修改 php-fpm的启动用户
session 文件夹是 /var/lib/php/session
vi /etc/php-fpm.d/www.conf
将用户改为和用户组改为 apache
user =apache
group =apache
或者将根据php-fpm的用户修改session文件的权限
Copy after login

##2. Time zone setting

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

Approach:

1. Add time zone setting in php code

date_default_timezone_set(‘PRC’);
Copy after login
2. Modify php.ini to set default time zone

date.timezone = PRC
Copy after login

Recommended tutorial: PHP video tutorial

The above is the detailed content of php verification code error prompt. 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