Why does the cgi environment not inherit environment variables?

Why does the cgi environment not inherit environment variables?

Post by Matthew Whit » Fri, 14 May 1999 04:00:00



When using apache it normally inherits the environment in which it was
started and keeps this environment for executing cgi scripts. For example:
if root has oracle environment variables such as ORACLE_SID set when
starting the server then these are normally available to cgi scripts when
they execute much like the path is. However sometimes and specifically this
time they are not. Could someone explain how this works? It seems to be
somewhat random to me. I've had situations where various instances of the
server had different paths than others.

I'm running apache 1.3.4 and apache 1.3.6 on solaris 2.7 with mod_perl 1.18
and 1.19 respectively.

Matt

 
 
 

Why does the cgi environment not inherit environment variables?

Post by Alexander Reelse » Fri, 14 May 1999 04:00:00


Hello


> When using apache it normally inherits the environment in which it was
> started and keeps this environment for executing cgi scripts. For example:
> if root has oracle environment variables such as ORACLE_SID set when
> starting the server then these are normally available to cgi scripts when
> they execute much like the path is. However sometimes and specifically this
> time they are not. Could someone explain how this works? It seems to be
> somewhat random to me. I've had situations where various instances of the
> server had different paths than others.

Take a look at the Setenv and Passenv directive.

MfG, Alexander

--
Alexander Reelsen       http://www.veryComputer.com/
Making use of non-free software on another machine is unfortunate but does not
put you in the same m*dilemma as having it on your own machine.