I use Laravel 5.0.33 and i have the following folders on my server:
/var/www/laravel_dev/
/var/www/laravel_stage/
/var/www/laravel_production/
They each have their own .env file and database, but for some reason each of them sometimes loads the wrong .env file (like once every 100th request).
I figured it loads the wrong .env file because when i dump the env database:
var_dump(env('DB_DATABSE'));
It sometimes return the name of the laravel_production database on the laravel_dev site.
I have made a grep search for the laravel_production database name, and it's not in the dev folder.
I have triede to dump the dir constant (DIR) various places, it's always correct.
Does anyone have an idea what could be wrong, or how i can dig further into what could be wrong?