-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le 20/10/2015 15:34, Antony Dovgal a écrit : > Hello Remi. > > I do understand that I'm a bit late with this one, but this patch > actually FORCES IPv6 for port-only syntax. I've got both IPv6 and > IPv4 configured and getaddrinfo() returns only 1 address - the IPv6 > one. This happens because "::" seems to be a shorthand for "::1".
No, this is a shorthand for "all addresses" > So when no hostname is specified FPM always tries to listen on IPv6 > only instead of doing what the patch was intended to do. The only > way to force IPv4 is to specify IP address or a hostname > ("localhost" is enough). > > This either needs to be fixed, or reflected in the docs. I think this is in the comments PHP 5.x >> -; 'port' - to listen on a TCP socket to all IPv4 -; >> addresses on a specific port; -; '[::]:port' - to listen on a >> TCP socket to all addresses ; (IPv6 and >> IPv4-mapped) on a specific port; PHP 7.x >> +; 'port' - to listen on a TCP socket to all addresses ; >> (IPv6 and IPv4-mapped) on a specific port; Test with listen = 9070 # netstat -putan | grep 9070 tcp6 0 0 :::9070 :::* LISTEN 28371/php-fpm: mast # fcgiget localhost4:9070/ping .. pong # fcgiget localhost6:9070/ping .. pong So it works on "modern" distro. Perhaps a "IPv4-mapped when supported" in the comment. Remi. P.S. and this was applied only in 7.0, especially to avoid breakage on "old" distro running 5.x -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlYmSxcACgkQYUppBSnxahgvzACfeWY9fArWcGbl7kV34SEKtdam PzQAnRyTsY6nTlr8mop0xr98jZsvLhNL =5OXR -----END PGP SIGNATURE----- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php