Consider this environment:
$ cat .htaccess
AddType application/x-httpd-php .php .html
SetEnv Foo Bar
$ cat test.php
<?php
echo "Hello: ";
echo $_SERVER['Foo'];
echo $_ENV['Foo'];
echo getenv('Foo');
?>
$ cat test.html
<?php
echo "Hello: ";
echo $_SERVER['Foo'];
echo $_ENV['Foo'];
echo getenv('Foo');
?>
This is the output of test.php
:
Hello BarBarBar
This is the output of test.html
:
Hello
Why might that be? How might I fix it?
Here is phpinfo.php
:
http://pastebin.com/rgq7up61
Here is phpinfo.html
:
http://pastebin.com/VUKFNZ36
If anyone knows where I can host a real webpage instead of just the HTML for one, please let me know and I'll move the content to there. Thanks.
the difference is visible in the block:
there in the html-version all variables are set in the old global form:
and in the new form too:
in the php version they are set only in the new form. it seems like the html-version uses another php.ini.
also i see the variable
maybe the html-file is parsed with the