Re: REMOTE_ADDR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I am running PHP 5 on a Apache platform (Mac) and I have just noticed
> that the log I keep of ip's entering my site, is showing the internal
> server ip instead of the external visitor ip.
>
> I am using getenv("REMOTE_ADDR") and is has been working before.

Try $_SERVER['REMOTE_ADDR'] instead of getenv()

Not sure it will be different, but it's what I use...

It's possible your httpd.conf User is [re-]setting the environment
variable REMOTE_ADDR -- which may or may not be how Apache transmits that
to PHP -- I dunno, really.

If that doesn't help, perhaps <?php phpinfo(); ?> will help you sort out
what's what.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux