Laravel. No supported encrypter found. The cipher and / or key length are invalid.

If you have pull a project from a Git repository or from another source and you get the error

RuntimeException in compiled.php line 7706:
No supported encrypter found. The cipher and / or key length are invalid.

This occurs because the .env file doesn’t exist or because you haven’t generated the APP_KEY in the .env file.

APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_URL=http://localhost

You have to execute this command from the

$ php artisan key:generate
Application key [base64:b6GcD7jRA44BKel6VShUe/hOdF3HAGi9+B1ZeLE/8pk=] set successfully.

This command generates and changes the APP_KEY in the .env file

APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:b6GcD7jRA44BKel6VShUe/hOdF3HAGi9+B1ZeLE/8pk=
APP_URL=http://localhost

Now you can load the web.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.