Closed mustafa2033 closed 6 years ago
The reason why this happens can be found in this method https://github.com/vlucas/phpdotenv/blob/master/src/Loader.php#L363 :)
You must cache your config files (by running the command php artisan config:cache
) so that LoadEnvironmentVariables
bootstraper is never bootstrapped which means that the .env file will not be read anymore. That also means that you should not use the env()
function anywhere outside of your config files as it will always return null
then.
Description: When running multi laravel apps on the same host if one app thread is still proccessing any request the request to the other app takes its env vars from the first app, the first app connecting to remote db so its slow proccess but why the other app switching its env to the first one when he is proccessing, is this php issue?? Explenation needed.
Steps: Request to app 1 that is running slow proccess and befor the proccessing finished sending another request to app 2 will result both apps will have their env vars from app 1.