#40279 [NEW]: fsockopen broken on IPv6
| From: | SiliconFiend at gmail dot com | Date: | Mon, 29 Jan 2007 22:02:48 +0000 |
| Subject: | #40279 [NEW]: fsockopen broken on IPv6 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-108210@lists.php.net to get a copy of this message | ||
From: SiliconFiend at gmail dot com
Operating system: Windows XP SP2
PHP version: 5.2.0
PHP Bug Type: Sockets related
Bug description: fsockopen broken on IPv6
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
--
Edit bug report at http://bugs.php.net/?id=40279&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40279&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40279&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40279&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40279&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40279&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40279&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40279&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40279&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40279&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40279&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40279&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40279&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40279&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40279&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40279&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40279&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40279&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40279&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40279&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40279&r=mysqlcfg