This problem is in all multi-threaded SAPIs. Because of this the array $_SERVER is there. Scripts programmed for PHP 4+ should never use getenv() to get server variables. For example in the NSAPI module you get the environment of the webserver itself, never a CGI env.

CGI env only works for Apache 1, CGI, FastCGI, Apache 2 prefork. All other SAPI modules have the same problem.

So I think it would be good to do the following:
Provide user a "compatibility" php.ini option "emulate_cgi_env" which is per default off.
If it is on and ZTS is enabled - the normal getenv(name) php function should return $_SERVER[name].


Uwe

At 14:18 25.07.2003 +0200, Mattias Wadman wrote:
On Fri, 25 Jul 2003 14:10:02 +0200
Magnus Maatta <[EMAIL PROTECTED]> wrote:

> On Fri, 25 Jul 2003 13:47:54 +0200
> Mattias Wadman <[EMAIL PROTECTED]> wrote:
>
> > Hello
> >
> > I submitted the bug http://bugs.php.net/?id=24802 and [EMAIL PROTECTED] told me to resend it to you. I also attach a non-web-form-mangled patch.
> >
> > Hope you like the patch.
>
> Where is the patch ? =)


Weird, i looked in my send box and the mail had the patch attached. I got a reply from [EMAIL PROTECTED] that i had to confirm my address, maybe that has something to do with it?

Anyway i uploaded it to http://www.galaxen.se/~mattias/temp/thttpd-sapi-getenv.patch

-Mattias

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

----- Uwe Schindler Addr 1: Bamberger Str. 24a, D-96049 Bamberg Addr 2: Drausnickstr. 153, D-91052 Erlangen http://www.thetaphi.de - http://www.schindlers-software.de eMails: [EMAIL PROTECTED] (private); [EMAIL PROTECTED] (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346)

Schindlers Software - Home of Schindlers PC-LATEIN 3.10
DIE Software zum Lateinlernen!



-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to