[wp-trac] [WordPress Trac] #38291: gethostbyname() at wp-includes/http.php don´t work if host is ipv6 configured

WordPress Trac noreply at wordpress.org
Mon Oct 17 03:23:13 UTC 2016


#38291: gethostbyname() at wp-includes/http.php don´t work if host is ipv6
configured
--------------------------+------------------------------
 Reporter:  lofesa        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  HTTP API      |     Version:  4.6.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by dd32):

 * component:  General => HTTP API


Comment:

 Hi @lofesa,

 Can you provide more details on how the host is configured with IPv4 /
 IPv6? I have multiple IPv6 mixed mode hosts and the only issues i've had
 with similar outcomes is when it's been configured incorrectly (personal
 experience there).

 As WordPress.org doesn't have any IPv6 connectivity at present, there
 should be no IPv6 addresses in play here, and your DNS server shouldn't be
 able to resolve anything - but it should be falling back to IPv4 and
 `0.0.0.0` shouldn't be returned here at all.

 Can you perhaps try on the command line and see what `dig +short
 api.wordpress.org` and `dig -6 +short api.wordpress.org` return?

 The other thing to check would be if changing `$ip = gethostbyname( $host
 );` to `$ip = gethostbyname( $host . '.' );` works for you.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38291#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list