Description
I am running a development server using PHP 7.1, PHP-FPM, nginx 1.8.0, and Dotenv 2.4.0. The nginx .conf
file for my server, I eventually figured out, included a fastcgi_param
directive setting the APP_ENV
environment variable to dev
. Consequently, even though I had a line APP_ENV=development
in my .env
file, which was being loaded by Dotenv, a call to getenv('APP_ENV')
returned dev
and not, as expected, development
.
As I understand the Dotenv documentation, this is dependent on using overload()
and not simply load()
. However, the two behaved similarly.
This seems very similar to issue #39. Ideally it would be great to change the behavior of Dotenv (assuming this is possible). In the meantime, it would at least be helpful to note the limitation in the documentation (in the section about overwriting values).