For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > March 2005 > Re: [PHP-INSTALL] SERVER["REMOTE_ADDR"]









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] SERVER["REMOTE_ADDR"]
Rasmus Lerdorf

2005-03-18, 3:57 am

te@xinunix.de wrote:
> Dear all
>
> i have a big problem.
>
> <?
> echo $_SERVER['REMOTE_ADDR'];
> ?>
>
> if i call this file the value is not my client ip - it the local server ip
> REMOTE_ADDR and SERVER_ADDR are the same.
>
> can any help me - i m very .


You are probably behind a reverse proxy then. Look through the
phpinfo() output and see if you have HTTP_X_FORWARDED_FOR with the
correct ip.

-Rasmus
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com