Joomla 2.5.x - reCaptcha - Could not open socket

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
lightningbit
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sun Jan 22, 2006 5:23 pm

Joomla 2.5.x - reCaptcha - Could not open socket

Post by lightningbit » Sat Nov 10, 2012 11:54 am

Hi,

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 )
by :

Code: Select all

if (($fs = @fsockopen(gethostbyname($host), $port, $errno, $errstr, 10)) == false )
That seems to resolve the issue for now

Not sure how this needs to be rolled up in Joomla next releases
because the fix may not work when you need IPv6

L.

sistematico
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Sep 09, 2011 12:01 am

Re: Joomla 2.5.x - reCaptcha - Could not open socket

Post by sistematico » Wed Nov 21, 2012 5:55 am

Thank you!!!

tom-010
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Apr 18, 2013 7:43 pm

Re: Joomla 2.5.x - reCaptcha - Could not open socket

Post by tom-010 » Thu Apr 18, 2013 7:46 pm

Thanks!

toocool
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Sun Feb 23, 2014 8:45 am

Re: Joomla 2.5.x - reCaptcha - Could not open socket

Post by toocool » Sun Oct 19, 2014 4:40 pm

Hello!

I have the same problem. That solution is not works for me. Any idea?

victormadrid9
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 21, 2014 12:40 am

Re: Joomla 2.5.x - reCaptcha - Could not open socket

Post by victormadrid9 » Tue Oct 21, 2014 12:46 am

Thank you! I had this problem and solve it!! :D


Locked

Return to “General Questions/New to Joomla! 2.5”