Forum Moderators: phranque

Message Too Old, No Replies

Why can't my CGI script get my environment variables?

Is this because of suexec?

         

kaidok

11:48 am on May 28, 2009 (gmt 0)

10+ Year Member



I have put the following enviromental variables on my httpd.conf file:

SetEnv var test
PassEnv HOME

But if I try to use those variables in a cgi script called by suexec they don't show, I mean, this is the code to show them:

echo "<H2>$HOME</H2>"
echo "<H2>$var</H2>"

But nothing is shown on my web page.

I have read that suexec stablishes a "tidy enviroment" when calling a cgi script, so it just keeps its own enviromental variables, (that seems to be true as the instruction echo "<H2>$REQUEST_METHOD</H2>" gives a result), but I have also read that it can be configured to pass your own enviromental variables, but I don't find information about how to do it

Does anyone know?