There's sometimes problems with which ip the remote_addr fetches, but this is the first time I've heard about it grabbing the servers own.
Check this:
Fetch the client ip
if(getenv(HTTP_X_FORWARDED_FOR)) {
$thisip = getenv(HTTP_X_FORWARDED_FOR);
} else {
$thisip = getenv(REMOTE_ADDR);
}
The getenv might not work if globals are off, so you might use the $_SERVER var.
But the x-forward should take care of (in most situations) the problem with firewalls/proxys.
If that doesn't work, try the good old phpinfo(); and see what it says about your remote_addr
knutm 😃