[THTTPD SAPI] Patch for implementing missing getenv

php.internals

Mattias Wadman

23 years ago
Hello I submitted the bug http://bugs.php.net/?id=24802 and magnus@php.net told me to resend it to you. I also attach a non-web-form-mangled patch. Hope you like the patch. -Mattias

Magnus Maatta

23 years ago
On Fri, 25 Jul 2003 13:47:54 +0200 Mattias Wadman <mattias@sudac.org> wrote:
> Hello > > I submitted the bug http://bugs.php.net/?id=24802 and magnus@php.net 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 ? =) /Magnus
-- The moon may be smaller than Earth, but it's further away.

Mattias Wadman

23 years ago
On Fri, 25 Jul 2003 14:10:02 +0200 Magnus Maatta <magnus@php.net> wrote:
> On Fri, 25 Jul 2003 13:47:54 +0200 > Mattias Wadman <mattias@sudac.org> wrote: > > > Hello > > > > I submitted the bug http://bugs.php.net/?id=24802 and magnus@php.net 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 internals@lists.php.net 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

Elfyn McBratney

23 years ago
On Fri, 25 Jul 2003, Mattias Wadman wrote:
> On Fri, 25 Jul 2003 14:10:02 +0200 > Magnus Maatta <magnus@php.net> wrote: > > > On Fri, 25 Jul 2003 13:47:54 +0200 > > Mattias Wadman <mattias@sudac.org> wrote: > > > > > Hello > > > > > > I submitted the bug http://bugs.php.net/?id=24802 and magnus@php.net 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 internals@lists.php.net 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
When you need to send patches to this list you have to append .txt to the filename (as IIRC, most if not all but .txt attachments are stripped from the mail). Elfyn
-- Elfyn McBratney, EMCB | http://www.nongnu.org/wwwauth/ http://www.emcb.co.uk | http://www.emcb.co.uk/webauth/ elfyn@emcb.co.uk | wwwauth-users AT nongnu DOT org

Moriyoshi Koizumi

23 years ago
Elfyn McBratney <elfyn@emcb.co.uk> wrote:
> When you need to send patches to this list you have to append .txt to the > filename (as IIRC, most if not all but .txt attachments are stripped from > the mail).
That trick is known not to be applied to Sylpheed :) It looks like the list manager drops any attachments whose MIME-type is other than text/plain, application/x-gzip, or application/zip. (Please correct me if I'm wrong..) Most user agents determine the MIME-type for the attachment according to the file extension, so if your mailer knows .diff has a plain text content, it tries to send with "text/plain", otherwise it would try to send with "application/octet-stream". Moriyoshi

Uwe Schindler

23 years ago
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 <magnus@php.net> wrote: > > > On Fri, 25 Jul 2003 13:47:54 +0200 > > Mattias Wadman <mattias@sudac.org> wrote: > > > > > Hello > > > > > > I submitted the bug http://bugs.php.net/?id=24802 and magnus@php.net > 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 internals@lists.php.net 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: uwe@thetaphi.de (private); info@schindlers-software.de (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346) Schindlers Software - Home of Schindlers PC-LATEIN 3.10 DIE Software zum Lateinlernen!