I'm trying to make an environment variable available to a PHP script.
I have exported the variable in /etc/profile, and it is available to all users including apache. (I temporarily allowed apache shell access through /etc/passwd to see what is going on)
but when I put: "PassEnv MYVAR" into /etc/httpd/conf/httpd.conf I get the following warning:
[Wed Apr 21 10:44:09 2010] [warn] PassEnv variable MYVAR was undefined
and its unavailable.
I tried the following in PHP: echo exec ("env> /tmp/env.txt")
and the output is as follows:
How can I get access to the variable MYVAR?