laravel No supported encrypter found. The cipher and / or key length are invalid
You only type in console:
php artisan key:generate
And if your app.php not change this Key, change manually.
Next if you should then happen to get this error message:
[ErrorException]
file_get_contents(/path/to/my/project/.env): failed to open stream: No such file or directory
Then make a copy of the .env.example
file and try again:
cp .env.example .envphp artisan key:generate
Do you have all the necessary extensions installed on the server?
- PHP >= 5.5.9
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
It could be that you're missing the OpenSSL extension. Also, do you have the key set in .env
file?
Try running:
php artisan key:generate
Answer: the 'cipher' => ''
was not set.