SixXS::Sunset 2017-06-06

IPv6 and current PHP (5.2.10/5.3.0)
[de] Shadow Hawkins on Friday, 07 August 2009 11:57:01
Hello all, have anybody else the problem, that IPv6 is brocken in PHP 5.2.10 or PHP 5.3.0? e.g. such code:
<?php fopen('http://[::1]/', 'r'); ?>
(or similar with fsockopen) is not working anymore since the PHP upgrade from 5.2.9. Also:
<?php fopen('http://localhost/', 'r'); ?>
is now connecting to "127.0.0.1" instead of "::1", as this is happens with 5.2.9. BTW: Always the same pc and if I look in phpinfo() I have: | IPv6 Support => enabled Regards, Carsten
IPv6 and current PHP (5.2.10/5.3.0)
[ch] Jeroen Massar SixXS Staff on Friday, 07 August 2009 12:00:26
is now connecting to "127.0.0.1" instead of "::1", as this is happens with 5.2.9.
Maybe they swapped the order of AAAA and A lookups and are now preferring IPv4 over IPv6? (This would be a really bad idea, as the system should handle that). Also check, if on Linux, that /etc/gai.conf is correct and what the behavior is AAAA and then A. Lastly, check that /etc/hosts still contain both IPv6 and IPv4 entries for localhost.
IPv6 and current PHP (5.2.10/5.3.0)
[de] Shadow Hawkins on Friday, 07 August 2009 12:07:28
Maybe they swapped the order of AAAA and A lookups and are now
preferring IPv4 over IPv6?
I guess that's a side effect, because IPv6 connections at all are broken. If I try to connect to an IPv6 IP (see post above) I get the message: | Warning: fopen(http://[::1]/): failed to open stream: operation failed
Also check, if on Linux,
I'm on Windows. Thus it would be also interesting, if others on *nix have the same problem.
IPv6 and current PHP (5.2.10/5.3.0)
[ca] Shadow Hawkins on Monday, 17 August 2009 22:11:38
Can you connect to http://[::1] with your web browser? Just need to make sure that you web server is still listening on the IPv6 localhost port. I have already had cases where upgrading one thing interfered with the configuration of something else.
IPv6 and current PHP (5.2.10/5.3.0)
[de] Shadow Hawkins on Wednesday, 19 August 2009 23:06:59
Can you connect to http://[::1] with your web browser?
Sure. PHP self shows me "::1" in $_SERVER['REMOTE_ADDRESS']. It's just that PHP itself can't connect to the own server with e.g. fopen('::1', 'r'). And same server, a PHP 5.2.9 have no problem with this. Only PHP 5.2.10 and 5.3.0 can't connect.
IPv6 and current PHP (5.2.10/5.3.0)
[ch] Jeroen Massar SixXS Staff on Tuesday, 18 August 2009 13:51:10
It seems that per-default IPv6 support is not compiled in. One has to use --enable-ipv6 at the configure line for it to work.
IPv6 and current PHP (5.2.10/5.3.0)
[de] Shadow Hawkins on Wednesday, 19 August 2009 23:08:34
One has to use --enable-ipv6 at the configure line for it to work.
This configure option is enabled. Just see also my phpinfo() output:
| IPv6 Support => enabled

Please note Posting is only allowed when you are logged in.

Static Sunset Edition of SixXS
©2001-2017 SixXS - IPv6 Deployment & Tunnel Broker