Skip to content
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

Dotenv does not overwrite values set in PHP-FPM via nginx fastcgi_param #268

Closed
mpavey0 opened this issue May 1, 2018 · 1 comment
Closed

Comments

@mpavey0
Copy link

mpavey0 commented May 1, 2018

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).

@GrahamCampbell
Copy link
Collaborator

Fixed by #284 I think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants