Solution to laravel 5.1 error: No supported encrypter found, laravelencrypter
This article describes how to solve laravel 5.1's error: No supported encrypter found. For more information, see the following:
Problem description
When laravel5.1 is used for project development, an error message "No supported encrypter found. The cipher and/or key length are invalid." is displayed, causing The page to fail to be displayed.
Most answers on the Internet are directly executed.PHP artisan key:generate
You can. Some people find it feasible and some do not solve it.
Solution
The first step to solve this problem is to check the cipher value in config/app. php:
1. If the value of cipher is AES-256-CBC, it can be solved by generating a new key and then restarting nginx and php-fpm. The new key is directly written into the. env file.
2. But if cipher is another value, such as a rijndael-256, you need to install and start the mcrypt module. The reason the AES-256-CBC is not needed is that the underlying layer of the AES-256-CBC algorithm is implemented with openssl, not mcrypt. The rijndael-256 is dependent on the mcrypt module.
Check whether mcrypt is installed. The method can be executionphp -r “print_r(mcrypt_list_algorithms());”
Whether there are output results, or viewphpinfo()
Information.
If the mcrypt module has been installed, start the mcrypt module.
The method is to execute:php5enmod mcrypt
Restart nginx and php-fpm.
Summary
The above is all the content of this article. I hope the content of this article will help you in your study or work. If you have any questions, please leave a message, thank you for your support.