From: david at advisorymatters dot co dot uk
Operating system: Windows XP Pro
PHP version: 4.3.3
PHP Bug Type: PHP options/info functions
Bug description: $_SERVER['PHP_SELF'] fails to return a value (broken since 4.3.2)

Description:
------------
Running the code (below) on 4.3.2 and above (I've checked it on 4.3.2,
4.3.3RC1 to RC4 and 4.3.3) fails to produce any output. On 4.3.0 and 4.3.1
it works fine.

For testing I am changing over the PHP versions just by renaming the
c:\php dir (from c:\php431, c:\php432, c:\php433-1 etc). Nothing in the
application changes and I am using one common php.ini file for all php
versions, ONLY the php version itself is changed. All PHP versions are the
standard Win32 Binaries with no modifications.

In php.ini register globals are OFF and the only other changes are to turn
a few extensions on (GD and DBX).

I am using the Xitami web server version 2.4d9 from [url]http://www.xitami.com[/url]
on a Compaq Evo system (Celeron 1.8MHz, 128MB RAM, WinXPPro).

I've noticed that this (or similar) bugs have been reported recently (e.g.
#24979) but dismissed by stating that it works with the latest CVS etc. If
this is the case when this bug report is checked then I would suggest that
there is something else going on here that is not showing up on your test
systems. It is ALWAYS reproducible here. Note that using
$_SERVER['SCRIPT_NAME'] DOES work (but my code tends to use
$_SERVER['PHP_SELF'] and why should I change?).



Reproduce code:
---------------
<?php
print "self = " . $_SERVER['PHP_SELF'];
?>

Expected result:
----------------
With the above code in the file test.php in the web server's doent
root:

self = /test.php


Actual result:
--------------
self =


--
Edit bug report at [url]http://bugs.php.net/?id=25448&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25448&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25448&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25448&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25448&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25448&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25448&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25448&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25448&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25448&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25448&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25448&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25448&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25448&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25448&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25448&r=gnused[/url]