I randomly get the following error:
"production.ERROR: No application key has been specified."
It doesn’t bother much because it doesn’t happen all the time and when it does the website just quickly refreshes, but I wonder where it comes from?
There is an application key and it happens randomly. Could that happen because I did not cache the config? Because I must not cache the config so I have to leave it un-cached
But also, why does it say production.ERROR
if my APP_ENV
is APP_ENV=local
? (And when I type php artisan env
it says that I’m really local)
Where should I look for to try to solve these 2 issues? (The wrong environment, and the random no app key errors?)
2
Answers
Run the
php artisan key:generate
command to generate the application keyPlease use
php artisan key:generate
command to generate key