Recaptcha verification problem in v3

jmarian1 04 Aug, 2011
Hi. I am not sure if I am the last person to notice this but I am experiencing a problem after I click the submit button in my form v3.2. I believe this is something to do with the recaptcha verification plugin being changed their legacy URL for reCAPTCHA's HTTPS API to a new address. Turning on the recaptcha verification plugin in the form, after entering all information and click submit button, it goes to a next page with an error message "Could not open socket" AND just plain text, no website design. This happened to all my forms. When I turned off the email verification plugin, all forms are working correctly. I already changed the server address to https://www.google.com/recaptcha/api from https://api-secure.recaptcha.net in the admin site and also change the address at the backend plugin file at components/chrono-contact/plugins/cf_recaptcha.php but still have the same issue. Did I miss anything? Any help is very much appreciated. Thanks.
GreyHead 05 Aug, 2011
Hi jmarian1,

It looks as though the site is failing to connect to the ReCaptcha server. Maybe something is blocking that connection?

Try turning ReCaptcha off (or test a copy of the form without ReCaptcha) to see if that is the problem.

Bob
jmarian1 05 Aug, 2011
HI Bob,

I mean turning off the recaptcha, not the email verification. My mistake.🙂 Anyway, yes it is the recaptcha connection. I already changed the server address in recaptcha because they changed it but somehow I still have the message "could not open socket". Are you going to update the file where the recaptcha resides in the chronoform folder as well? I believe it is the address that is giving us problem. The recaptcha turned down their legacy URL for reCAPTCHA's HTTPS API using SSL and maybe we need to change somewhere in the folder where the recaptcha plugin resides for the new SSL. Based on recaptcha notes, all instances of "https://api-secure.recaptcha.net" will need to change to "https://www.google.com/recaptcha/api" per http://groups.google.com/group/recaptcha/browse_thread/thread/57baacc2a067035a/ea0303e7d7a49262. Maybe that is the problem. Please advice. I like the recaptcha in the chronoform better than the regular spam validation. Thanks.
GreyHead 06 Aug, 2011
Hi jmarian1,

Thanks, I didn't know that the URL had changed.

In CFv3 it is configurable on the Advanced tab of the plug-in.
In CFv4 it is configurable on the Advanced tab of the Load ReCaptcha action.

In both cases, as you wrote, the entry "ReCaptcha secure server" needs to be changed to https://www.google.com/recaptcha/api

Bob
jmarian1 08 Aug, 2011
Hi Bob,

Thanks for your help. I get the answer. For the record, I did changed the URL in the advanced tab of v3 and v4 but it will still give you an error if you don't change the URL in the recaptcha file in the back end.
GreyHead 12 Aug, 2011
Hi jmarian1,

Thanks for the update. I had a quick look at the code and can't see any obvious reason why the configuration parameter isn't over-riding the default value :-(

Bob
jmarian1 17 Aug, 2011
Hi Bob,

I am not sure if this is the proper way but it solved my SSL certificate error message in my form using the secure server. I did change the URL server
'verify_server' => 'www.google.com',
and
if ( $privkey == null || $privkey == '' ) {
            die ("To use reCAPTCHA you must get an API key from
                <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
        }
in the
joomla/administrator/components/com_chronoforms/form_actions/check_recaptcha/check_captcha.php
as well as in the load_recaptcha file in the form_actions folder to
'api_server' => 'http://www.google.com/recaptcha/api',
      'api_secure_server' => 'https://www.google.com/recaptcha/api'


instead of recaptcha.net. Thanks!🙂
GreyHead 18 Aug, 2011
Hi Jmarian1,

Thanks for the update.

I'm still not sure why the over-ride from the configuration isn't working but probably best to change them all.

Later: I've updated the action files for CFv4 and passed them to Max for the next release.
As well as the change to the verify server there is a change reuired to the path in line 64 of check_recaptcha.php
        $response = $this->_recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify",


Bob
This topic is locked and no more replies can be posted.