[How to solve] – Laravel No supported encrypter found, The cipher and / or key length are invalid

Hi Coder, How are you today?  I hope you are okay. Are you still working with the framework laravel? If so, have you ever come across this error?


and then what’s the solution? The default cipher in confing/app.php is “AES-256-CBC” which needs a 32 character string, but the default key is “SomeRandomString,” which is only 16 characters. So, you can either set the cipher to “AES-128-CBC” which only needs 16 characters, or generate a new 32 character string for the key.

But before, copy or move the file .env.example

$ mv .env.example .env

Entering “php artisan key:gen”

$ php artisan key:generate
←[32mApplication key [base64:o1wvSoJzkxzFWrf9Nu9Vm5LzraVuxEFfwPkOxocXodg=] set successfully.←[39m

and now look, laravel has been running perfectly.


Source : https://laracasts.com/discuss/channels/forge/no-supported-encrypter-found-the-cipher-and-or-key-length-are-invalid-with-laravel-51?page=2


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s