Re: PHP 4.0 Bug #8725 Updated: Fun with putenv
| From: | (Mikhail Kuperblum) | Date: | Tue, 16 Jan 2001 04:06:27 +0000 |
| Subject: | Re: PHP 4.0 Bug #8725 Updated: Fun with putenv | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-44203@lists.php.net to get a copy of this message | ||
I was able (I think) to track the problem to my system's /bin/sh. Replacing
real /bin/sh with bash makes the problem go away. I'm not sure however that
making such change permanent is good for the overall health of my system.
Could php be coerced to use bash instead of sh (assuming it uses sh) for
putenv calls?
-mk
On Mon, Jan 15 (11:04pm), Bug Database wrote:
> ID: 8725
> Updated by: sniper
> Reported By: mikhail@whasup.com
> Old-Status: Open
> Status: Feedback
> Bug Type: Apache related
> Assigned To:
> Comments:
>
> I tried your script in my system (Linux) and with the latest CVS of PHP 4
> and it works just fine. Could you try the latest snapshot from
> http://snaps.php.net/
> to verify if this is fixed or if it is your system that causes this.
>
> --Jani
>
> Previous Comments:
> ---------------------------------------------------------------------------
>
> [2001-01-15 15:53:11] mikhail@whasup.com
> [this is a re-sent of my message, I accidentally inserted php config options in
> the wrong place of my previous message]
>
> Apache: 1.3.14 (with mod_php4 among other)
>
> test.phtml:
> <?
> putenv("one=one");
> $one=getenv("one");
> exec("echo two", $two, $ret);
> print("1: $one<br>");
> print("2: $two[0] ($ret)<br>");
> ?>
>
> Browser shows:
> 1: one
> 2: two (0)
>
> After hitting Reload, browser shows:
> 1: one
> 2: two (0)
>
> After hitting Reload again, browser shows:
> 1: one
> Warning: Undefined index: 0 in /u/local/apache/htdocs/test.phtml on line 6
> 2: (1)
>
> After "apachectl restart" the above repeats...
>
> Config options:
> configure --with-gd=/usr/local/gd --with-mysql --with-jpeg-dir=/tmp/jpeg-6b
> --with-apache=../apache_1.3.14
>
>
> ---------------------------------------------------------------------------
>
>
> Full Bug description available at: http://bugs.php.net/?id=8725