ID: 37989 Updated by: [EMAIL PROTECTED] Reported By: david at ols dot es -Status: Open +Status: Bogus Bug Type: Apache related Operating System: Linux PHP Version: 4.4.2 New Comment:
>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. Previous Comments: ------------------------------------------------------------------------ [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(), ... ------------------------------------------------------------------------ [2006-07-02 17:13:10] david at ols dot es Description: ------------ Apache Environment variables (DOCUMENT_ROOT, SERVER_NAME, etc ...) are visible via phpinfo() and getenv() but not inside programs called via exec() and also not available to the mailer when called via mail() Reproduce code: --------------- test.php: <?php passthrough('print_env'); ?> print_env: #!/bin/sh /usr/bin/printenv Expected result: ---------------- the very same variables reported as "Apache Enviroment" when calling phpinfo() Actual result: -------------- just a few standard shell variables ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37989&edit=1