diff --git a/main/network.c b/main/network.c index 076c7c7ef8022..bad3cd6a43900 100644 --- a/main/network.c +++ b/main/network.c @@ -193,7 +193,11 @@ static int php_network_getaddresses(const char *host, struct sockaddr ***sal TSR hints.ai_family = AF_INET; # endif if ((n = getaddrinfo(host, NULL, &hints, &res))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s" +# ifdef HAVE_IPV6 + " (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure)" +#endif + , PHP_GAI_STRERROR(n)); return 0; } else if (res == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "php_network_getaddresses: getaddrinfo failed (null result pointer)");