Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

arunmadathil's avatar

ciphers Error

Hi, I'm getting this error some time, i don't understand why this happen , .env is already having the app key and tried to create new one after clearing config cache , but nothing seems to give a desired or well fixed laravel application , some time its redirecting to laravel default welcome page on page reload ..

RuntimeException The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in Encrypter.php (line 43)

Already tired up of find a proper solution for the problem.

Any help would really appreciated.. Thanks

0 likes
2 replies
silverxjohn's avatar

Try to re-generate a new key

php artisan key:generate

Then clear the caches

composer dump-autoload - o

And

php artisan config:cache

arunmadathil's avatar

Not working .. I already tried all of this.. Including putting app key directly into config/app.php folder and it's working . But I wish to keep the key inside .env file itself

Please or to participate in this conversation.