|  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
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: darren at aoitalk dot com
New email:
PHP Version: OS:


 [2003-07-08 21:20 UTC] darren at aoitalk dot com
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


Reproduce code:
print '<pre>';
PRINT '</pre>';

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-09 07:35 UTC]
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-2023 The PHP Group
All rights reserved.
Last updated: Sat Sep 23 03:01:26 2023 UTC