Re: $_SERVER["REMOTE_ADDR"] returning ::1

From: Date: Thu, 18 Sep 2008 15:31:33 +0000
Subject: Re: $_SERVER["REMOTE_ADDR"] returning ::1
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-280443@lists.php.net to get a copy of this message
On Sep 17, 2008, at 957PM, David Rocks wrote:
I am running a test PHP web app on my local machine that uses REMOTE_ADDR and most of the time ::1 is returned as the IP addr and sometimes it is 127.0.0.1 . I am on OS X 10.5.5 and using APACHE 2. PHPINFO always returns ::1 for REMOTE_ADDR. Is this a PHP or a APACHE 2 thing?
I saw the same thing on my OS X box, and decided to disable IPV6 for now. Edit httpd.conf and change: "Listen 80" to "Listen 0.0.0.0:80" and when you restart Apache it'll always return 127.0.0.1 Brady

« previous php.general (#280443) next »