One day, the operator came over and said that it was useless to send the verification code by e-mail. As developers, it was our job to solve the problem.
First, check the error log and immediately find that PHP reported an error:
ErrorException: preg_match(): Compilation failed: invalid range in character class at offset 4
The error content means that the regular validation format is wrong and needs to be modified. However, we found no problems in the previous development and use, but recently.
This made us confused until we found that the PHP version of the server was changed from 7.2 to 7.3!
After the difference, we found the cause of the problem:
Upgrade PHP from 7.2 to PHP 7.3
The writing of regular verification format is not standardized
The solution is also simple:
Upgrade the PHP Version (you can not do it, but it is recommended to keep it unified with the server)
Note whether special characters in regular format are escaped. For example,
 needs to be escaped:
- XML parsing & special character error
- How to Solve Seata Nacos connection error: unknown user!
- [Solved] Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors wi…
- [Solved] SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position …
- Spring MVC upload file error string cannot be converted to multipartfile
- Python OSError: [errno 22] invalid argument: [How to Solve]
- Httprunner3 – special character processing: get the content type from the returned header (the error has been solved: bad jmespath expression: unknown token ‘-‘)
- Troubleshooting of nginx error under Windows: createfile() “XXX / logs / nginx. PID” failed
- Python uses xlwt length limit to report errors
- Error reason for adding PNG pictures in Android studio