Date: 03/01/00
- Previous message: sergio <email protected>: "[PHP-DEV] Bug #3674: Backreferences need 2 backslashes to work in preg_* functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: bbrown <email protected>
Operating system: HPUX 10.20, Solaris 7
PHP version: 3.0.14
PHP Bug Type: Misbehaving function
Bug description: getenv("PATH") after putenv("PATH") doesn't show new value
I am running 3.0.15, but bug database form doesn't have that as an option.
I need to modify the PATH environment variable in my script. I get the current value with getenv("PATH"), then
modify it with putenv. If I do a subsequent getenv("PATH") to verify the change, it is not shown. phpinfo(), however,
shows the changed variable. But is it being made available to child processes?
The following script reproduces the problem on both HPUX 10.20 and Solaris 7 running Apache 1.3.12 with PHP as a DSO.
<?
# Fetch PATH env var
$path = getenv("PATH");
echo $path . "<BR>\n";
# Append to the path
putenv("PATH=$path:/foo/bar");
# Print the changed path (?)
echo getenv("PATH") . "<BR>\n";
# phpinfo shows it correctly
phpinfo();
?>
The problem appears to only afflict the PATH variable; others work fine.
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Previous message: sergio <email protected>: "[PHP-DEV] Bug #3674: Backreferences need 2 backslashes to work in preg_* functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

