This article describes the solution to laravel5.1 error: Nosupportedencrypterfound. This article is very detailed and has some reference and learning value for everyone. if you need it, you can refer to it for reference, let's take a look. This article describes the solution to laravel 5.1 error: No supported encrypter found. This article is very detailed and has some reference and learning value for everyone, for more information, see the following.
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:generateYou 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.
The above is the details about the solution to the error "No supported encrypter found" reported by laravel 5.1. For more information, see other related articles in the first PHP community!