ID:               37989
 User updated by:  david at ols dot es
 Reported By:      david at ols dot es
-Status:           Bogus
+Status:           Open
 Bug Type:         Apache related
 Operating System: Linux
 PHP Version:      4.4.2
 New Comment:

ok, but according to apache documentation apache setenv "Sets an
environment variable, which is then passed on to CGI scripts and SSI
pages" , it could be considered that those variables should also be in
php enviroment, where in fact they appear to be (as they could be
accesed with getenv) and that it should also be in the enviroment of
programs called by php. From a strict point of view the enviroment of
apache should be propagated to php and then also to programs called by
php. Apache API has functions to initialize and set the enviroment but
that functions are not called by the php module. In th other hand when
php is run as cgi then that enviroment is correctly set which makes it
more inconsistent with how it works when run as an apache module.

Maybe this could be trated as a feature request rather than an bug (and
i could provide a patch for the apache php module which will correctly
set the enviroment).

Anyway the documentation should be changed to state that the apache
enviroment in not really in the real program enviroment and that is not
available for programs called by php).


Previous Comments:
------------------------------------------------------------------------

[2006-07-03 06:47:28] [EMAIL PROTECTED]

>If PHP can access that variables via getenv() it (should)
>mean that they are in the enviroment 

Nope. That means only that those "environment" variables are in Apache
hash.

------------------------------------------------------------------------

[2006-07-03 05:57:51] david at ols dot es

If PHP can access that variables via getenv() it (should) mean that
they are in the enviroment and should also be accesible to programs
called by PHP, but they are not. This does not look like a apache
issue, it's PHP who calls the external programs and who has the chance
to set it's enviroment

------------------------------------------------------------------------

[2006-07-02 20:36:26] [EMAIL PROTECTED]

This is how Apache works and apparently PHP cannot change it.
Not PHP problem.

------------------------------------------------------------------------

[2006-07-02 18:29:04] david at ols dot es

varibles set by putenv() are correctly set and visible inside programs
called by exec(), passthrough(), ...

in the other hand also env vars set by SetEnv apache directive are also
not available inside programs called via
exec(), passthrough(), ...

------------------------------------------------------------------------

[2006-07-02 18:28:16] david at ols dot es

varibles set by putenv() are correctly set and visible inside programs
called by exec(), passthrough(), ...

in the other hand also env vars set by SetEnv apache directive are also
not available inside programs called via
exec(), passthrough(), ...

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/37989

-- 
Edit this bug report at http://bugs.php.net/?id=37989&edit=1

Reply via email to