$_ENV array is empty

I'm tring to print the values of $_ENV using PHP 4.3.4 (and 4.3.8) by using the next code:
var_dump($_ENV);

The result of it is:
array(0) { }

While using phpinfo() function I'm getting all the information in the Environment section but still any call for the $_ENV variable returns an empty string:
echo $_ENV["HOST"] ==> Empty string.

I'm sure it worked in previous versions of php with the same code.

Any idea?
LVL 1
BuzAsked:
Who is Participating?
 
hernst42Connect With a Mentor Commented:
make sure your php.ini contains the sollowing setting:
variables_order = "EGPCS"
if the E is missing $_ENV will be empty

See also http://bugs.php.net/bug.php?id=29971
0
 
minichickenCommented:
Does EGPCS stand for ENV, GET, POST, COOKIE, SESSION ??
0
 
BuzAuthor Commented:
Thanks hernst, that was quick and exactly what I've been looking for.
0
All Courses

From novice to tech pro — start learning today.