Re: com php-src: FPM: change "listen = port" behavior from IPv4 catch-all to IPv6 catch-all (+ IPv4-mapped): UPGRADING sapi/fpm/fpm/fpm_sockets.c
sapi/fpm/php-fpm.conf.in

From: Date: Tue, 20 Oct 2015 14:09:27 +0000
Subject: Re: com php-src: FPM: change "listen = port" behavior from IPv4 catch-all to IPv6 catch-all (+ IPv4-mapped): UPGRADING sapi/fpm/fpm/fpm_sockets.c
sapi/fpm/php-fpm.conf.in
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-88885@lists.php.net to get a copy of this message
-----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-----

« previous php.internals (#88885) next »