I have a Laravel 5 application that works perfectly on multiple servers. But on a specific Server, the values of my .env
file are not readable via the \Config
facade, or the config()
function.
Let me give an example with the APP_DEBUG
environment entry, the same goes for all other entries.
My .env file (the same on all servers) consists, amongst others, of the following line:
APP_DEBUG=false
through the use of $app->environmentFile()
I know, that my .env
file is used.
When I directly output the debug
param via env('APP_DEBUG')
, I get the correct value (false
), but all approaches to read the value from the config (\Config::get('app.debug')
, config('app.debug')
, app('config')->get('app.debug')
) only returned NULL
.
I also tried to clear the cache via artisan cache:clear
, because I thought, there could be some caching issue, but that didn't change a thing.
I also tried set the permissions of the .env file to 777.
When I output my whole config via \Config::all()
, all values that are correctly set on my other servers, are NULL
on this specific server.
Any suggestions?
Edit for clarification: The project is set up twice on the same server on two different Virtual hosts, one to serve the dev.domain.tld (for development), and one to serve the www.domain.tld (for production). Both folders use the same webserver, the same PHP version and the same user