|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-01-29 22:02 UTC] SiliconFiend at gmail dot com
Description: ------------ Bug #30057 seems to have regressed. On Windows, when IPv6 is enabled, [::1] is returned as the first address for localhost, so using localhost exhibits the same problem. Other info: Using PHP 5.2.0 in mod_php with Apache 2.2.3 which was included with XAMPP; IPv6 Support is reported as enabled in phpinfo(). Apache displays page when http://[::1]/ is entered in Firefox, so Apache is responding to IPv6 requests on port 80. Reproduce code: --------------- $handle = fsockopen('[::1]', 80, $errno, $errstr, 5); if (empty($handle)) { echo 'Error ' . $errno . ': ' . $errstr . '<br/>'; exit("Can't open socket"); } Or use the reproduce code in #30057. Expected result: ---------------- No error. Actual result: -------------- Warning: fsockopen() [function.fsockopen]: unable to connect to [::1]:80 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) Error 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Can't open socket PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 22:00:01 2025 UTC |
Very weird, this started happening to me, too. Symptoms: + ping 'localhost' returns ::1 + using "telnet localhost 80" works, ie apache responds ok + php fsockopen(localhost) stalls, plus apache show no access logs, nor etheral captures any packets on any nic How ipv6 got enabled is a mystery to me. It is explicitly disabled on ALL network connections I have in use. All I did today was enabling the wifi nic (intel 2200) to connect to my new home lan... Maybe the dns server is broadcasting ipv6 addresses for localhost (wtf) ??? I tried ipconfig /flushdns to no avail. No trace of ::1 in etc/hosts either... btw, ipconfig /displaydns shows: 5.64.3.10.in-addr.arpa ---------------------------------------- Nome record . . . . . : 5.64.3.10.in-addr.arpa. Tipo record . . . . . : 12 Durata (TTL). . . . . : 0 Lunghezza dati. . . . : 4 Sezione . . . . . . . : Risposta Record PTR . . . . . : srvmappemxp 1.0.0.127.in-addr.arpa ---------------------------------------- Nome record . . . . . : 1.0.0.127.in-addr.arpa. Tipo record . . . . . : 12 Durata (TTL). . . . . : 0 Lunghezza dati. . . . : 4 Sezione . . . . . . . : Risposta Record PTR . . . . . : localhost srvmappemxp ---------------------------------------- Nome record . . . . . : srvmappemxp Tipo record . . . . . : 1 Durata (TTL). . . . . : 0 Lunghezza dati. . . . : 4 Sezione . . . . . . . : Risposta Record A (Host) . . . : 10.3.64.5 localhost ---------------------------------------- Nome record . . . . . : localhost Tipo record . . . . . : 1 Durata (TTL). . . . . : 0 Lunghezza dati. . . . : 4 Sezione . . . . . . . : Risposta Record A (Host) . . . : 127.0.0.1