Incorrect remote address

Status
Not open for further replies.

dawwin39

New Member
Messages
7
Reaction score
0
Points
0
Today I noticed that $_SERVER['REMOTE_ADDR'] always contains "127.0.0.1" instead of correct remote host address. Yesterday it was fine. My web page is http://dawwin.x10.bz . Can someone fix this?
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
I don't see any errors on your site. If you are still having this problem, could you post the url where the error is happening?
 

dawwin39

New Member
Messages
7
Reaction score
0
Points
0
My webpage looks fine, but i've got a problem with php variable $_SERVER['REMOTE_ADDR']; Normally it contains viewer's IP address, but today I noticed that it has value "127.0.0.1". This page http://dawwin.x10.bz/test.php contains following code
Code:
<?php
    echo $_SERVER['REMOTE_ADDR'];
?>
If it's fine you should see your public IP address. I need this in my guest book.
 

dawwin39

New Member
Messages
7
Reaction score
0
Points
0
it works fine with
Code:
$_SERVER['HTTP_X_FORWARDED_FOR']
I've found this thread, before I asked, but I didn't check if it works, because thread was quite old and REMOTE_ADDR stopped work today.
Thanks
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
It appears the code we had in place to fix REMOTE_ADDR got lost in the server upgrade, I'll ask an admin to add it back in.
 
Status
Not open for further replies.
Top