1

The $_ENV dictionary is unavailable on PHP Microsoft Azure Websites. You must use getenv instead.

I found this page: http://aarondancer.com/2015/08/16/accessing-environment-variables-on-an-azure-web-app-in-php/

However I want to know why this is the case. Is there a php.ini setting to control this?

This does break some applications of mine that depend on $_ENV existing. I can shim it by creating it myself, but how can I enumerate environment variables so I can fully populate it?

Dai
  • 141,631
  • 28
  • 261
  • 374
  • It's one of PHP's more confusing aspects. Specifically (TL;DR on the dupe) `The getenv function worked because it apparently searches both $_ENV and $_SERVER`. So it's deceptive in what it's setting and where. – Machavity Feb 13 '17 at 20:19

0 Answers0