I can't seem to access any environmental variables set in /etc/environment via PHP. I have tried $_ENV
, $_SERVER
and getenv()
.
I also checked the output of phpinfo()
to attempt to list the environmental variables. They were not there, which would indicate the issue to be with Apache or the PHP configuration.
I am using PHP7.0 with Apache 2.2 on Ubuntu 16.04.1, hosted on DigitalOcean. Hoping someone can help me.