Try running below command which set APP_KEY, This might be not set, that's why you are getting this error
php artisan key:generate
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all I just started to use Laravel and as the two last times it is really hard to get it running. Since yesterday I try to just get Laravel run without an error.
I installed Laravel with its installer and after the first errors I updated the project with composer update. But now I get the error message RuntimeException in Encrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
I do have my .env file and even if I clear the cache & config, re-genate the key the error still stays. I even tried to set and remove the 'key' => env() in the config/app.php file
Strangely with each key:generate the key is appended, not replaced. Wondering if this is normal
Please or to participate in this conversation.