remote_attr returns an incomplete IP, how to resolve?

Asked

Viewed 48 times

1

I’m making a login system, and time to search the ip with $_SERVER['remote_addr'] ip comes like this : " ::1 "

Can anyone explain to me why? It will be my machine?

  • 1

    ::1 is Ipv6 equivalent to Ipv4 127.0.0.1. You can get the expected result by changing the apache httpd.conf line: Listen 80 to Listen 127.0.0.1:80 and right after restarting apache.

  • Now my wamp won’t start

  • I edited the wrong line, now it worked! Thanks friend

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.