Home  >  Article  >  Backend Development  >  php verification code error prompt

php verification code error prompt

王林
王林Original
2019-09-29 11:54:273321browse

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文件的权限

##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’);
2. Modify php.ini to set default time zone

date.timezone = PRC

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!

Statement:
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
Previous article:What to use to edit phpNext article:What to use to edit php