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

From: Date: Sun, 23 Jan 2005 19:12:16 +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-547@lists.php.net to get a copy of this message
On Sunday 23 January 2005 19:43, Nuno Lopes wrote: > > 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(). I noticed an A and AAAA lookup in ethereal and the ipv6 address was used, which is good because I've enabled it > > > 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? oops, forgot to mention something.. the ipv6 address, which is being used by default, is attached to a server that gives a Connection Refused error that is why the ftp function won't work. it uses ipv6 fine, but the server refuses. the ipv4 ip that is returned by the gethostbyname() in the script will also return the correct and most used ip, which is good some time ago there was a problem with nl3.php.net, which ended up with an incorrect setup for ipv6, the ipv4 site worked fine I've contacted the openldap.org team, I hope they can fix this issue because it should not be needed, but I noticed that after some more research. Vincent > > Nuno

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