04-30-2011, 02:19 PM
04-30-2011, 03:23 PM
Your server possibly is using an internal proxy.
You'll need to figure out what it is (eg a lighttpd frontend -> Apache backend?) and according override the REMOTE_IP variable.
You'll need to figure out what it is (eg a lighttpd frontend -> Apache backend?) and according override the REMOTE_IP variable.
04-30-2011, 05:32 PM
I not sure how to do that. It is a shared hosting.
I will glad if you elaborate it a bit..
I will glad if you elaborate it a bit..
04-30-2011, 06:41 PM
Is this the forum in your signature? If so, it looks possible that there may be a proxy, though I can't really tell.
GET /
GET /
Code:
|
GET /jscripts/popup_menu.js?ver=1600
Code:
|
IDK what "X-Cache" there refers to, but might be a hint.
Ask your host for further details on whether they're using a proxy to handle PHP/CGI requests, and ask them what header contains the "real" IP. From memory, nginx, by default, uses X-Real-IP I think, so if your host is using that, you'd edit inc/init.php, and put, after "<?php":
PHP Code:
|
I can't really give you any more info - you'll need to question your host for their setup and how to fix.
04-30-2011, 07:10 PM
yes that is the forum.
Thanks for the help..
I asked my host they said
I was getting an error undeclared T_VARIABLE if I put this $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP']; at the start of init.php.
So I modified the function.php and included the line at the start of get_ip function.
Every thing is working fine now.
Thanks again.
Thanks for the help..
I asked my host they said
Quote:The Server is running as Nginx Server in front-end and Apache Server is running at Back-end.
I was getting an error undeclared T_VARIABLE if I put this $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP']; at the start of init.php.
So I modified the function.php and included the line at the start of get_ip function.
Every thing is working fine now.
Thanks again.
04-30-2011, 10:21 PM
I'm somewhat surprised about that.
Sticking it at the top of init.php will show an error of there's a problem. Putting it in functions.php will hide the error, but shouldn't fix the problem.
Oh well...
Sticking it at the top of init.php will show an error of there's a problem. Putting it in functions.php will hide the error, but shouldn't fix the problem.
Oh well...
04-30-2011, 10:41 PM
I actually copy pasted the code that you provided but I got error in init.php but the same thing worked fine in function.php.
Code:
|