httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <>
Subject Re: setenv/unsetenv?
Date Thu, 06 Apr 2000 06:36:50 GMT
> > Yes, but isn't it counter-intuitive to not have unsetenv do this?  It
> > should at the very least be documented that unsetenv doesn't actually
> > unset an env variable.
> well, setenv doesn't set one either does it?


> And unsetting/setting certain variables after httpd is started doesn't
> have any impact on the already running process anyway in some situations.

Sure, but that's not really the concern here.

> I think the key here is that "env variables" are _NOT_ unix environment
> variables.  They are a structurally similar thing that are stored inside
> Apache for the use of modules.  It happens that mod_cgi uses them in a
> certain way, so does mod_include, etc. that allows them to be passed on to
> things that aren't apache modules themselves.  It is only in those cases
> that they are actually set in the "real" environment.

The typical case where people need to mess around with environment
variables is for database libraries where on the connect the stupid
database api goes and checks a bunch of moronic environment variables that
tell it how to connect.  The absence or presence of environment variables
at this point can make a big difference.

The fact that Apache has these setenv and unsetenv directives that don't
actually set and unset env variables is a constant source of hassle for me
as people expect them to actually do something useful in this situation,
and they don't.

So, what I would like to see is at least some documentation that says that
the setenv/unsetenv directives actually don't.  And perhaps an alternative
set of slow and unthreadsafe realsetenv/realunsetenv directives that
actually do.


View raw message