From: phil at lavin dot me dot uk
Operating system: Linux 2.6.30
PHP version: 5.2.11
PHP Bug Type: Sockets related
Bug description: IPv6 with fsockopen broken
Description:
------------
When connecting to an IPv6 address, either hostname or raw address in []
an 'unknown error' is thrown. This problem occurs on both Linux and BSD and
both test machines can correctly telnet to the requested address.
p...@127dot0dot0dot1:~$ php info.php | grep -i ipv6
IPv6 Support => enabled
p...@127dot0dot0dot1:~$
Reproduce code:
---------------
<?php
$a = fsockopen('[2610:1e8:2900:a::8]', 6667);
if ($a) { echo 'yay'; } else { echo 'nay'; }
?>
Expected result:
----------------
The code should echo 'yay'.
Actual result:
--------------
Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Unknown error) in /root/test.php on line 2
--
Edit bug report at http://bugs.php.net/?id=50214&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50214&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50214&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50214&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50214&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50214&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50214&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50214&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50214&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50214&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50214&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50214&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50214&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50214&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50214&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50214&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50214&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50214&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50214&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50214&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50214&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50214&r=mysqlcfg