IPv6 support for php-fpm (fixes: #55508)

This removes hardcoded IPv4 code and adds support for IPv6
This looks like replacing ']' by \0 which seems strange to me