You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Any PHP scripts running through PHP FPM seem to put all variables that are in my .env file into the $_SERVER supergloball, even if I disable dotEnv integration.
Note that setting "clear_env" = "no" makes all environment variables go away, but of course also those in my .nix file.
Now when I open the index.php and dump $_SERVER i see APP_ENV=prod as defined in my .env. Which is not what I want, since I also would like my .env.local to override this (default Symfony / Shopware behavior).
Enabling the dotenv integration and specifying both files makes it use the right environment variables, but then I need to restart my services each time I change one, while Symfony normally dynamically loads the files.
Note that devenv shell does NOT have the .env variables, and I can't seem to find where FPM get's them from. If there is anything I can do to help find the issue or explain it better, let me know.
Version
devenv 1.0.5 (aarch64-darwin)
The text was updated successfully, but these errors were encountered:
I just had a somehow related problem for another project where $_ENV was always an empty array.
I needed to set variables_order = "EGPCS" in my php.ini (via php.buildEnv extraConfig) to make my project load the environment correctly.
Describe the bug
Any PHP scripts running through PHP FPM seem to put all variables that are in my
.env
file into the$_SERVER
supergloball, even if I disable dotEnv integration.To reproduce
https://gist.github.com/nickygerritsen/a2c52ba9e8e2f8bf96485bb05169f654
Note that setting
"clear_env" = "no"
makes all environment variables go away, but of course also those in my.nix
file.Now when I open the index.php and dump
$_SERVER
i seeAPP_ENV=prod
as defined in my.env
. Which is not what I want, since I also would like my.env.local
to override this (default Symfony / Shopware behavior).Enabling the dotenv integration and specifying both files makes it use the right environment variables, but then I need to restart my services each time I change one, while Symfony normally dynamically loads the files.
Note that
devenv shell
does NOT have the.env
variables, and I can't seem to find where FPM get's them from. If there is anything I can do to help find the issue or explain it better, let me know.Version
The text was updated successfully, but these errors were encountered: