Re: gethostbyaddr and IPv6
| From: | Lars Torben Wilson | Date: | Sat, 22 Nov 2008 03:10:40 +0000 |
| Subject: | Re: gethostbyaddr and IPv6 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283644@lists.php.net to get a copy of this message | ||
2008/11/21 Glen C <carrerag@hotmail.com>:
> Hello,
>
> Does gethostbyaddr actually work for anyone while looking up an IPv6
> address? I can't seem to get it to work. For example:
>
> echo gethostbyaddr ( '2001:470:0:64::2' );
>
> should return "ipv6.he.net" but instead I get the following error:
>
> [21-Nov-2008 22:43:37] PHP Warning: gethostbyaddr()
> [<a href='function.gethostbyaddr'>function.gethostbyaddr</a>]:
> Address is not in a.b.c.d form in C:\www\tests\saved\host.php on line 7
>
> Google has not been my friend in this matter...
>
> Any insight?
> Thanks,
> Glen
Hi Glen,
Works for me. IPv6 support was added in 2001. You didn't say what
version of PHP you are having this problem with, so it's hard to say
why yours doesn't have support for it. Perhaps it was configured with
--disable-ipv6 for some reason, or compiled on a system without the
necessary libraries installed (which would be somewhat surprising).
Torben