skip to Main Content

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


  1. Run the php artisan key:generate command to generate the application key

    Login or Signup to reply.
  2. "Before using Laravel's encrypter, you must set a key option in your config/app.php in config file"
    

    Please use php artisan key:generate command to generate key

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search