RE: [PHP-QA] RC5 report with Win32 and Apache: ok except $PHP_SELF
| From: | James Moore | Date: | Thu, 14 Dec 2000 10:55:01 +0000 |
| Subject: | RE: [PHP-QA] RC5 report with Win32 and Apache: ok except $PHP_SELF | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-1858@lists.php.net to get a copy of this message | ||
>
> Therefore, there's one bug with this particular build in CGI mode (I
> can't compile Win32 as I don't have the tools and don't know how this
> has been compiled):
>
> $PHP_SELF returns the whole path /php4/php.exe instead of the actual Web
> path:
>
> ex. I load http://192.168.0.1/foo/test.php
>
> test.php is:
>
> <a href="<?echo $PHP_SELF?>?lang=en">Foo</a>
>
> and the HTML output is:
>
> <a href="/php4/php.exe/foo/test.php?lang="en">Foo</a>
>
> (btw, this works too and output the same again)
>
> In Apache module mode, the problem doesn't show up.
>
> Additional notes & tests:
>
> I downloaded binary from
> ftp://ftp.phpuk.org/php_binaries/php-4.0.4RC5-win32.zip
>
> and the same happens, phpinfo() loaded from
> http://192.168.0.1/php/info.php
> shows PHP_SELF /php4/php.exe/php/info.php
>
> PS: I was properly changing php4ts.dll every time I switched versions.
When working in CGI mode $PATH_INFO should be used rather than $PHP_SELF
which in cgi mode is reporting the correct path, this isnt a bug but the way
that apache (or any other CGI system AFAIK) reports the script name.
James
--
James Moore
PHP Quality Assurance Team
jmoore@php.net