Re: cvs: docweb /include lib_url_entities.inc.php

From: Date: Sun, 23 Jan 2005 18:43:28 +0000
Subject: Re: cvs: docweb /include lib_url_entities.inc.php
References: 1 2 3  Groups: php.doc.web 
Request: Send a blank email to doc-web+get-546@lists.php.net to get a copy of this message
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

« previous php.doc.web (#546) next »