Home > Article > Backend Development > 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 codedate_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!