ID:               42094
 Updated by:       [EMAIL PROTECTED]
 Reported By:      fushimi at rep dot fielding dot nec dot co dot jp
-Status:           Open
+Status:           Bogus
 Bug Type:         Apache2 related
 Operating System: Windows 2000
 PHP Version:      5.2.3
 New Comment:

It's apache that isn't setting it. PHP only sets the variables to
whatever the server says they are. No bug in PHP.


Previous Comments:
------------------------------------------------------------------------

[2007-07-26 00:48:12] fushimi at rep dot fielding dot nec dot co dot jp

Thank you, to reply me so quickly.

Yes, $_SERVER['REMOTE_ADDR'] return the right IP address.

One more thing that I forgot to mention, my Http server is Apache
version 2.2.4.

To help you, below is the results of PHP variable using phpinfo():
PHP5.2.3 and Apache2.2.4
========================
_SERVER["SERVER_ADDR"] 192.168.1.3 
_SERVER["SERVER_PORT"] 80 
_SERVER["REMOTE_ADDR"] 0.0.0.0
_SERVER["REMOTE_PORT"] 0

PHP5.1.2 and Apache2.0.59
=========================
_SERVER["SERVER_ADDR"] 192.168.1.2 
_SERVER["SERVER_PORT"] 80 
_SERVER["REMOTE_ADDR"] 192.168.1.1 
_SERVER["REMOTE_PORT"] 2476

------------------------------------------------------------------------

[2007-07-25 11:58:27] [EMAIL PROTECTED]

Does it show up in $_SERVER['REMOTE_ADDR'] ??

------------------------------------------------------------------------

[2007-07-25 07:53:25] fushimi at rep dot fielding dot nec dot co dot jp

Description:
------------
I am evaluating the newest PHP 5.2.3, in relation with my current PHP
5.1.2.
So, when I tried to get the remote IP using getenv(“REMOTE_ADDR”), I
obtained the following results:

PHP 5.2.3 => return 0.0.0.0
PHP 5.1.2 => return 192.168.1.1

PHP in ISAPI mode.


Reproduce code:
---------------
$ip = getenv("REMOTE_ADDR");
echo "IP Address ....: ".$ip;


Expected result:
----------------
IP Address ....: 192.168.1.1

Actual result:
--------------
IP Address ....: 0.0.0.0


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42094&edit=1

Reply via email to