#50214 [Opn-Fbk]: IPv6 with fsockopen broken

2009-11-19 Thread jani
 ID:   50214
 Updated by:   j...@php.net
 Reported By:  phil at lavin dot me dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Linux 2.6.30
 PHP Version:  5.2.11
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:


[2009-11-18 22:24:58] carsten_sttgt at gmx dot de

The same problem exists with 5.2.11 on Windows too.

Of course that's a known problem, and exists also in PHP 5.3.0. In PHP
5.3.1 (rc/dev) that's fixed.

Is (/was) there no backport to 5.2.11?

Regards,
Carsten



[2009-11-18 19:02:46] phil at lavin dot me dot uk

Having just downloaded and compiled 5.2.11 (just using ./configure with
no options)...

p...@127dot0dot0dot1:~/php5/php-5.2.11$ sapi/cli/php -r
'var_dump(fsockopen([2610:1e8:2900:a::8], 6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Unknown error) in Command line code on line 1
bool(false)
p...@127dot0dot0dot1:~/php5/php-5.2.11$


Phil



[2009-11-18 18:03:50] j...@php.net

It's properly configured if it's not disabled in configure line with
--disable-ipv6 option. f.e.:

# rm -f config.cache  ./configure  make
# sapi/cli/php -r 'var_dump(fsockopen([2610:1e8:2900:a::8], 6667));'
Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable)..




[2009-11-18 17:05:44] phil at lavin dot me dot uk

Can you please define 'properly' so that I may contact the package
maintainers of PHP for Debian, FreeBSD and RHEL to notify them that they
are doing something wrong.

I would have thought that, considering phpinfo reports that IPv6 is
enabled in the php compile on every server, it should work correctly.



[2009-11-18 17:00:20] j...@php.net

When compiled properly 5.2.11 will give what I got. 



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50214

-- 
Edit this bug report at http://bugs.php.net/?id=50214edit=1



#50214 [Opn-Fbk]: IPv6 with fsockopen broken

2009-11-18 Thread jani
 ID:   50214
 Updated by:   j...@php.net
 Reported By:  phil at lavin dot me dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux 2.6.30
 PHP Version:  5.2.11
 New Comment:

Was PHP compiled properly? ie. did you enable ipv6 support? (check
phpinfo() output for 'IPv6 Support'.


Previous Comments:


[2009-11-18 10:08:29] phil at lavin dot me dot uk

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 this bug report at http://bugs.php.net/?id=50214edit=1



#50214 [Opn-Fbk]: IPv6 with fsockopen broken

2009-11-18 Thread jani
 ID:   50214
 Updated by:   j...@php.net
 Reported By:  phil at lavin dot me dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux 2.6.30
 PHP Version:  5.2.11
 New Comment:

# sapi/cli/php -r 'var_dump(fsockopen([2610:1e8:2900:a::8], 6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable) 

..so I'd say your system is either misconfigured or missing ipv6
support or the target is not there. :)


Previous Comments:


[2009-11-18 14:37:10] phil at lavin dot me dot uk

The grep output in the original bug report is of a phpinfo. It is
'enabled'

Phil



[2009-11-18 14:28:37] j...@php.net

Was PHP compiled properly? ie. did you enable ipv6 support? (check
phpinfo() output for 'IPv6 Support'.



[2009-11-18 10:08:29] phil at lavin dot me dot uk

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 this bug report at http://bugs.php.net/?id=50214edit=1



#50214 [Opn-Fbk]: IPv6 with fsockopen broken

2009-11-18 Thread jani
 ID:   50214
 Updated by:   j...@php.net
 Reported By:  phil at lavin dot me dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux 2.6.30
 PHP Version:  5.2.11
 New Comment:

When compiled properly 5.2.11 will give what I got. 


Previous Comments:


[2009-11-18 16:58:27] phil at lavin dot me dot uk

I have just tested it on 5 different servers running 5.2.11. All give
the same error, e.g.

p...@server:~$ php -r 'var_dump(fsockopen([2610:1e8:2900:a::8],
6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Unknown error) in Command line code on line 1
bool(false)
You have new mail in /var/mail/phil
p...@server:~$

This is regardless of whether they do or don't have IPv6 support.

A server running 5.2.9 gives what you got:

p...@server1:~$ php -r 'var_dump(fsockopen([2610:1e8:2900:a::8],
6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable) in Command line code on line 1
bool(false)
p...@server1:~$

Phil



[2009-11-18 16:55:04] phil at lavin dot me dot uk

My system is fine. It has IPv6 support and the target is there.

p...@127dot0dot0dot1:~$ telnet 2610:1e8:2900:a::8 6667
Trying 2610:1e8:2900:a::8...
Connected to 2610:1e8:2900:a::8.
Escape character is '^]'.
:Equinox.GeekShed.net NOTICE AUTH :*** Looking up your hostname...
:Equinox.GeekShed.net NOTICE AUTH :*** Found your hostname
^]
telnet close
Connection closed.
p...@127dot0dot0dot1:~$

I have had this same issue on both a Linux box and a BSD box running
5.2.11

Phil



[2009-11-18 16:53:05] j...@php.net

# sapi/cli/php -r 'var_dump(fsockopen([2610:1e8:2900:a::8], 6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable) 

..so I'd say your system is either misconfigured or missing ipv6
support or the target is not there. :)



[2009-11-18 14:37:10] phil at lavin dot me dot uk

The grep output in the original bug report is of a phpinfo. It is
'enabled'

Phil



[2009-11-18 14:28:37] j...@php.net

Was PHP compiled properly? ie. did you enable ipv6 support? (check
phpinfo() output for 'IPv6 Support'.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50214

-- 
Edit this bug report at http://bugs.php.net/?id=50214edit=1



#50214 [Opn-Fbk]: IPv6 with fsockopen broken

2009-11-18 Thread jani
 ID:   50214
 Updated by:   j...@php.net
 Reported By:  phil at lavin dot me dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Linux 2.6.30
 PHP Version:  5.2.11
 New Comment:

It's properly configured if it's not disabled in configure line with
--disable-ipv6 option. f.e.:

# rm -f config.cache  ./configure  make
# sapi/cli/php -r 'var_dump(fsockopen([2610:1e8:2900:a::8], 6667));'
Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable)..



Previous Comments:


[2009-11-18 17:05:44] phil at lavin dot me dot uk

Can you please define 'properly' so that I may contact the package
maintainers of PHP for Debian, FreeBSD and RHEL to notify them that they
are doing something wrong.

I would have thought that, considering phpinfo reports that IPv6 is
enabled in the php compile on every server, it should work correctly.



[2009-11-18 17:00:20] j...@php.net

When compiled properly 5.2.11 will give what I got. 



[2009-11-18 16:58:27] phil at lavin dot me dot uk

I have just tested it on 5 different servers running 5.2.11. All give
the same error, e.g.

p...@server:~$ php -r 'var_dump(fsockopen([2610:1e8:2900:a::8],
6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Unknown error) in Command line code on line 1
bool(false)
You have new mail in /var/mail/phil
p...@server:~$

This is regardless of whether they do or don't have IPv6 support.

A server running 5.2.9 gives what you got:

p...@server1:~$ php -r 'var_dump(fsockopen([2610:1e8:2900:a::8],
6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable) in Command line code on line 1
bool(false)
p...@server1:~$

Phil



[2009-11-18 16:55:04] phil at lavin dot me dot uk

My system is fine. It has IPv6 support and the target is there.

p...@127dot0dot0dot1:~$ telnet 2610:1e8:2900:a::8 6667
Trying 2610:1e8:2900:a::8...
Connected to 2610:1e8:2900:a::8.
Escape character is '^]'.
:Equinox.GeekShed.net NOTICE AUTH :*** Looking up your hostname...
:Equinox.GeekShed.net NOTICE AUTH :*** Found your hostname
^]
telnet close
Connection closed.
p...@127dot0dot0dot1:~$

I have had this same issue on both a Linux box and a BSD box running
5.2.11

Phil



[2009-11-18 16:53:05] j...@php.net

# sapi/cli/php -r 'var_dump(fsockopen([2610:1e8:2900:a::8], 6667));'

Warning: fsockopen(): unable to connect to [2610:1e8:2900:a::8]:6667
(Network is unreachable) 

..so I'd say your system is either misconfigured or missing ipv6
support or the target is not there. :)



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50214

-- 
Edit this bug report at http://bugs.php.net/?id=50214edit=1