From:             phpbug at easihosting dot co dot uk
Operating system: linux
PHP version:      4.3.3RC1
PHP Bug Type:     Sockets related
Bug description:  $_SERVER[remote_addr] different to $remote_addr

Description:
------------
When register_globals is on one would expect the registered globals to be
the same values as the variables accessed through the global arrays.

$remote_addr doesn't always return the IP of the visitor to the site but
the IP of another visitor to another site on the same server.

$server_name doesn't always return the host name for the site being
visited, but that of another site being hosted on the same server.

Reproduce code:
---------------
        echo '$SERVER_NAME';
        echo " ";
        echo "$SERVER_NAME";
        echo "<br>";

        echo '$_SERVER[SERVER_NAME]';
        echo " ";
        echo "$_SERVER[SERVER_NAME]";
        echo "<br>";


Expected result:
----------------
$SERVER_NAME www.p800.co.uk
$_SERVER[SERVER_NAME] www.p800.co.uk

Actual result:
--------------
$SERVER_NAME www.p800.co.uk
$_SERVER[SERVER_NAME] www.symbos.co.uk

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

Reply via email to