IP Address Invalid with PHP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

IP Address Invalid with PHP

Postby hamasaki » 10. May 2010 14:40

Hello,

Been a user of Xampp for awhile now, always brilliant, never any issues. Many thanks. :)

I recently installed Xampp on my new Windows7 laptop. If I use PHP to echo my IP address via:

echo $_SERVER['REMOTE_ADDR'];

Instead of 127.0.0.1 I see ::1

Anyone got any ideas as to why this happens?

Thanks
h.
hamasaki
 
Posts: 2
Joined: 10. May 2010 14:35

Re: IP Address Invalid with PHP

Postby Wiedmann » 10. May 2010 15:45

Because "::1" is a valid IPv6 address (localhost address), and your browser is making the request from this ip.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: IP Address Invalid with PHP

Postby hamasaki » 11. May 2010 08:53

Thank you very much.
hamasaki
 
Posts: 2
Joined: 10. May 2010 14:35


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 92 guests