#37989 [Opn]: Enviroment variables not availabe on exec,mail,...

From: Date: Sun, 02 Jul 2006 18:28:17 +0000
Subject: #37989 [Opn]: Enviroment variables not availabe on exec,mail,...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99040@lists.php.net to get a copy of this message
ID: 37989 User updated by: david at ols dot es Reported By: david at ols dot es Status: Open Bug Type: Feature/Change Request 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 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

« previous php.bugs (#99040) next »