Re: [DOC-WEB] cvs: docweb /include lib_url_entities.inc.php

[email protected] ("Nuno Lopes")
Newsgroups php.doc.web
Message-ID <001301c5017b$6dc37b60$0100a8c0@pc07653>
> It's quite simple actually..
>
> dig AAAA ftp.openldap.org
> ftp.openldap.org.       3600    IN      CNAME   www.openldap.org.
> www.openldap.org.       3600    IN      AAAA
> 2001:4f8:3:ba:2e0:18ff:fe02:efec
>
> $ php -r
> "var_dump(gethostbyname(gethostbyaddr('2001:4f8:3:ba:2e0:18ff:fe02:efec')));"
> string(14) "204.152.186.50"
>
> $ php -r "var_dump(gethostbyname('ftp.openldap.org'));"
> string(14) "204.152.186.57"

gethostbyname() internally uses the same C function, while ftp_connect() 
uses php_network_getaddresses().


> my system and php tries to use ipv6, which is not strange these days, and
> therefor tried to connect to 204.152.186.50, which will return false for 
> the
> ftp_connect() call.


But ftp_open() *does* support IPv6 (at least in CVS). A PHP bug?

Nuno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.