Bug #67808 [NEW]: Env variables through the built-in server set in $_ENV but not in $_SERVER

From: Date: Fri, 08 Aug 2014 20:42:17 +0000
Subject: Bug #67808 [NEW]: Env variables through the built-in server set in $_ENV but not in $_SERVER
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187037@lists.php.net to get a copy of this message
From: morgan dot auchede at gmail dot com Operating system: PHP version: Irrelevant Package: Built-in web server Bug Type: Bug Bug description:Env variables through the built-in server set in $_ENV but not in $_SERVER Description: ------------ If we set an environment variable through Apache (or Nginx), the variable will be available in "$_ENV" and "$_SERVER". Unfortunately, if we set an environment variable through the built-in server, the variable will only be available in "$_ENV" (not in $_SERVER). See the original issue related: https://github.com/symfony/symfony/issues/10208 Test script: --------------- # test.php <?php var_dump($_ENV['FOO']); var_dump($_SERVER['FOO']); # bash export FOO="bar" php -d variables_order=EGPCS -S 0.0.0.0:8000 -t . test.php Expected result: ---------------- string 'bar' (length=3) string 'bar' (length=3) Actual result: -------------- string 'bar' (length=3) Notice: Undefined index: FOO -- Edit bug report at https://bugs.php.net/bug.php?id=67808&edit=1 --

« previous php.bugs (#187037) next »