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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC