blaenk / wp-recaptcha

I gave ownership of this project to Google many years ago
Other
38 stars 16 forks source link

IPv6 can cause "Could not open socket" #51

Open ajorg opened 12 years ago

ajorg commented 12 years ago

Since google enabled IPv6 on www.google.com my site has been giving "Could not open socket" errors to commenters (without anything in the apache error logs even!). I chased it down to (probably) IPv6 and found that changing @fsockopen($host, [...] to @fsockopen(gethostbyname($host), [...] in recaptchalib.php alleviated the issue for me (gethostbyname in php doesn't support ipv6 queries (!?).

I'm not sure what the actual issue is, or what the long-term fix might be, but something is broken in IPv6 land.