since a few weeks, on some of my joomla sites, where I use the Joomla built in reCaptcha on the contact form, I suddenly started to get the error message "Could not open socket"
The issue is present in versions anywhere from Joomla 2.5.3 to 2.5.8
To reproduce :
- enable recaptcha for the contact form
- complete the contact form and fill in recaptcha
- hit send
- the error comes immediately after hitting send
I read somewhere this has to do with being on a server with IPV6
How to fix:
/public_html/plugins/captcha/recaptcha/recaptcha.php
on or around line 189:
replace :
Code: Select all
if (($fs = @fsockopen($host, $port, $errno, $errstr, 10)) == false )
Code: Select all
if (($fs = @fsockopen(gethostbyname($host), $port, $errno, $errstr, 10)) == false )
Not sure how this needs to be rolled up in Joomla next releases
because the fix may not work when you need IPv6
L.