#31517 [NEW]: (cgi) PHP_SELF not correctly set?

From: Date: Wed, 12 Jan 2005 13:32:37 +0000
Subject: #31517 [NEW]: (cgi) PHP_SELF not correctly set?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-71957@lists.php.net to get a copy of this message
From: yoghoyogho at fastmail dot fm Operating system: Debian/GNU Linux 2.4.27-1-686-sm PHP version: 4.3.10 PHP Bug Type: Scripting Engine problem Bug description: (cgi) PHP_SELF not correctly set? 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 bug report at http://bugs.php.net/?id=31517&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31517&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31517&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31517&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31517&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31517&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31517&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31517&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31517&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31517&r=support Expected behavior: http://bugs.php.net/fix.php?id=31517&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31517&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31517&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31517&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31517&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31517&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31517&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31517&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31517&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31517&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31517&r=mysqlcfg

« previous php.bugs (#71957) next »