Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2000101

[PHP-DEV] Re: [PHP-QA] 4.0.3RC1 reports on *BSD, Alpha and ia64: ok overall From: Andi Gutmans (andi <email protected>)
Date: 10/03/00

At 01:20 PM 10/3/00 +0200, Olivier Cahagne wrote:
>Andi Gutmans wrote:
>
> > I think SCRIPT_FILENAME should be SCRIPT_NAME.
> >
> > Andi
> >
> > At 12:37 PM 10/3/00 +0300, Andi Gutmans wrote:
> >
> >> Can you try and edit cgi_main.c line 315 and change:
> >> SG(request_info).request_uri = getenv("PATH_INFO");
> >> to:
> >> SG(request_info).request_uri = getenv("PATH_INFO");
> >> if (!SG(request_info).request_uri || !SG(request_info).request_uri[0]) {
> >> SG(request_info).request_uri = getenv("SCRIPT_FILENAME");
> >> }
> >>
> >> I don't know if this is supposed to fix it but it might.
>
>Fixed, on my RH6.2 setup with --enable-discard-path and on my NetBSD
>setup too, also with --enable-discard-path.

I commited the patch to the CVS (without the second part of the if()
statement which really shouldn't be needed).

>It's indeed SCRIPT_NAME, it gives me:
>
><img src="/cgi-bin/info.cgi?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"
>
>SCRIPT_FILENAME would give me:
>
><img
>src="/opt/apache/cgi-bin/info.cgi?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"
>
>And Netscape 4.x on Unix display images.
>
>ok, my PHP setup here is nearly perfect ! I just need cURL to compile
>with PHP and, then... I'll start thinking of Sablotron.
>
>This needs to be tested on Win32 and in normal cgi mode in Unix.
>
>I really don't know if it should be in 4.0.3, images not displaying is
>no so important and it's the only way this bug showed up, I don't know
>if the fix affects cgi's behaviour in another way.
>
>Shouldn't the fix be part of the #if DISCARD_PATH as the bug only showed
>when using --enable-discard-path ?

I don't think this patch can do any harm. It uses SCRIPT_NAME as the URI
only if PATH_INFO is not defined.

Andi

---
Andi Gutmans <andi <email protected>>
http://www.zend.com/

-- 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>