Solution to Nosupportedencrypterfound error when using laravel5.1-php Tutorial

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.