ID: 37989
User updated by: david at ols dot es
Reported By: david at ols dot es
Status: Open
-Bug Type: Feature/Change Request
+Bug Type: Apache related
Operating System: Linux
PHP Version: 4.4.2
New Comment:
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(), ...
Previous Comments:
------------------------------------------------------------------------
[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