#31517 [Opn->Bgs]: (cgi) PHP_SELF not correctly set?
| From: | sniper@php.net | Date: | Thu, 13 Jan 2005 03:23:09 +0000 |
| Subject: | #31517 [Opn->Bgs]: (cgi) PHP_SELF not correctly set? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72027@lists.php.net to get a copy of this message | ||
ID: 31517
Updated by: sniper@php.net
Reported By: yoghoyogho at fastmail dot fm
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Debian/GNU Linux 2.4.27-1-686-sm
PHP Version: 4.3.10
New Comment:
Something wrong with the configuration / webserver.
Ask support questions on the appropriate mailing list.
Previous Comments:
------------------------------------------------------------------------
[2005-01-12 14:32:27] yoghoyogho at fastmail dot fm
Description:
------------
In accordance with http://bugs.php.net/bug.php?id=13606 and
http://www.php.net/manual/en/reserved.variables.php
I would expect
PHP_SELF to contain test.php/foo.bar. if the script_name is test.php
and it called through the browser with:
test.php/foo.bar.
Instead I get /foo.bar. as PHP_SELF.
Cited from http://www.php.net/manual/en/reserved.variables.php:
"For instance, $_SERVER['PHP_SELF'] in a script at the address
http://example.com/test.php/foo.bar would be
/test.php/foo.bar."
So the behaviour I see seems to be inconsistens with the docs.
Here's a snippet from my phpinfo:
Configure Command
'../configure' '--prefix=/usr' '--with-regex=php'
'--enable-force-cgi-redirect' '--with-config-file-path=/etc/php4/cgi'
'--disable-rpath' '--enable-fastcgi' '--enable-memory-limit'
'--disable-debug' '--with-layout=GNU' '--with-pear=/usr/share/php'
'--enable-calendar' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid'
'--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4'
'--with-iconv' '--enable-exif' '--enable-filepro'
'--enable-ftp'
'--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr'
'--enable-shmop' '--enable-sockets' '--enable-wddx'
'--disable-xml'
'--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp'
'--with-zlib'
'--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr'
'--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--disable-static'
'--without-mm' '--without-mysql' '--without-sybase-ct'
Server API CGI/FastCGI
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
My question is this:
Is this is a bug or do I do something wrong in the configuration?
TIA
Reproduce code:
---------------
<?php
// this file is called test.php
echo $_SERVER['PHP_SELF'];
?>
Expected result:
----------------
/test.php/foo.bar.
(this result is shown when the script is run like this:
test.php/foo.bar.)
Actual result:
--------------
/foo.bar.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31517&edit=1