New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is env function delayed? #14511
Comments
Thanks for getting in touch. You just need to run the |
Once the config is cached, we skip reading the |
Thank you so, @GrahamCampbell |
Hey guys, I'm having this issue from time to time. It's totally random. Every few requests, it fails reading the key from the .env file, but most of the request go through with no problems. Running config:cache seems to do the trick, but this is on a development machine. Is there any other way to get around this than running config:cache periodically? |
No, sorry. This is a bug inherit to the way PHP works. Probably a no-fix. :( |
Cool, no problem. Thank you! What should I search for if I want to learn more about this issue with PHP? |
Well, whenever I google about this error
I found it is needed to regenerate a valid 32-length hash for AES-256-CBC. Okay, it's right.
However, I thought the ENV may be delaying to retrieve the custom data from the
.env
file. Because it appears again sometimes. Look atconfig/app.php
for:'key' => env('APP_KEY', 'someDifferentKeyFromTheDotEnvFile'),
Is it possible to decrypt the session with the wrong key at runtime?
Would OPCACHE improve that
.env
file reading? Is it any to do with config:cache for improvement?Thanks in advance!
The text was updated successfully, but these errors were encountered: