php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24553 Error with $_SERVER["REMOTE_ADDR"]
Submitted: 2003-07-08 21:20 UTC Modified: 2003-07-09 07:35 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: darren at aoitalk dot com Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.3.3RC1 OS: OSX 10.2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: darren at aoitalk dot com
New email:
PHP Version: OS:

 

 [2003-07-08 21:20 UTC] darren at aoitalk dot com
Description:
------------
Hi all,

I am unsure if I have this right....  but using an OSX 
10.2.6 Server running 4.3.3RC1, when I ask for the users IP 
address via $_SERVER["REMOTE_ADDR"] I get the IP address of 
the webserver, not the browser client, though if I ask for 
$_SERVER['HTTP_PC_REMOTE_ADDR'], I do get the client IP.

Hope this helps

Daz

Reproduce code:
---------------
print '<pre>';
print_r($GLOBALS);
PRINT '</pre>';

Expected result:
----------------
[REMOTE_ADDR] => <my browser ip address>

Actual result:
--------------
[REMOTE_ADDR] => <my web server ip address>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 07:35 UTC] sniper@php.net
Just some webserver difference. And you can't really rely on that anyway, most times it's just the proxy IP anyway.

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Aug 04 16:01:23 2021 UTC