6
votes

It is Laravel 5.4 setup of my web app. one thing is happening repeatedly on page load. and because of that, I am not able to get data on my page.

Runtime exception: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

Got this error repeatedly

I would be thankful for any help.

5
So it's happening sometimes but not all the time? - apokryfos
yes, not all the time - Hardika Satasiya
I'm facing this same error in my laravel5.3 project with php7.4 - PriyankMotivaras

5 Answers

21
votes

I think you should try this

run this command

php artisan key:generate

and the clear config cache using

php artisan config:cache
3
votes

Make sure your app config has key and cipher set. Also make sure your .env file does not have an empty APP_KEY entry. Finally run:

php artisan key:generate
1
votes

Make sure to set APP_Key in .env file and then run following command in the terminal of your application root.

php artisan key:generate
1
votes

i was getting the same error
run this command
php artisan key:generate
and then this command
php artisan config:clear

0
votes

i was getting the same error.

run this command.

php artisan key:generate

updated the app key in .env

work for me

you can take help from link