Home > Backend Development > PHP Tutorial > YII2 verification code formal environment and test environment are inconsistent

YII2 verification code formal environment and test environment are inconsistent

WBOY
Release: 2016-07-06 13:53:36
Original
1052 people have browsed it

  1. My local code and online code are exactly the same

  2. Both local and server use centos7.2

  3. My environment is nginx fpm

  4. Why does the verification code not change when I refresh the login page locally (this is my expected result), but the verification code changes every time I refresh the login page when I upload it to the server, causing me to The verification code is wrong when logging in.

I suspect it is a server problem, but I really have no clue. Has anyone encountered similar problems? Thanks!

Reply content:

  1. My local code and online code are exactly the same

  2. Both local and server use centos7.2

  3. My environment is nginx fpm

  4. Why does the verification code not change when I refresh the login page locally (this is my expected result), but the verification code changes every time I refresh the login page when I upload it to the server, causing me to The verification code is wrong when logging in.

I suspect it is a server problem, but I really have no clue. Has anyone encountered similar problems? Thanks!

If my judgment is not wrong, there should be a problem with your Session. Check your logs to see if any errors occurred

There is a bug in the verification code of yii2. This is already a very clear problem

Related labels:
php
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