- Posts: 2
- Thank you received: 0
"We couldn't contact the reCAPTCHA server" Error
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5.31
-- Browser(s) name and version -- : Chrome 48.0.2564.109 (64-bit)
-- Error-message(debug-mod must be tuned on) -- : "We couldn't contact the reCAPTCHA server to verify your answer. Please try again."
"We couldn't contact the reCAPTCHA server to verify your answer. Please try again."
This is when you submit the form to try to create an account. Server has port 80 and 443 open for outgoing TCP/UDP connections (as suggested in other threads).
There doesn't seem to be anything relevant in the PHP error logs on the server.
Please help with this error.
Please Log in or Create an account to join the conversation.
It uses the 443 outgoing port.
But it also requires the file_get_contents function to be allowed and the allow_url_fopen directive to be turned on:
www.a2hosting.com/kb/developer-corner/ph...-url-fopen-directive
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I'm also having the same problem. Hosts have gone through everything and there is are no blocks. The images appear for the user to match but then it doesn't authenticate.
Many thanks.
Please Log in or Create an account to join the conversation.
The hosts have fixed this issue. If anyone is having issues with this please find attached the plugin file that needs replacing.
From the hosts:
We can prove it's not a server issue via the screenshot attached.
The /home/shopat86/public_html/test/plugins/system/recaptcha2/recaptcha2.php file is processing the recaptcha output. I've made several comments in the code to assist your developer in finding the bug. The thing is, it's processing the input, it knows the value of the input is true, but it's failing.
Now, if I make it run successfully each time - bear with me, the actual recaptcha plugin should fail at a browser level if the captcha isn't successful, from what I understand - all registrations work.
Bottom line - the issue isn't related to the server, I'm afraid."
This works well. Thanks
Please Log in or Create an account to join the conversation.
Well, what I see in that modified code is that now you can register regardless of what you enter in the ReCaptcha field. It would always say that the captcha is correct because the hosting removed the check on the answer the plugin gets from the ReCaptcha server. In that case, you can just remove the ReCaptcha plugin completely since it always validates the registration regardless of what you write.
So it's not really a fix as far as I can see in the code. I invite you to test.
Try to change the code:
//var_dump($getResponse);var_dump($answers);exit;
//echo "<pre>"; print_r($answers); exit;
to:
var_dump($getResponse);var_dump($answers);exit;
echo "<pre>"; print_r($answers); exit;
in the code of the plugin.
That way, when you register, you should get a debug on the page displaying the request and response to the ReCaptcha server.
That will help us understand the problem if there is a problem with the way the answer is handled. But normally, it's the "success" variable which needs to be checked, like it's done by default.
Please Log in or Create an account to join the conversation.
Here are the results if I add that code:
string(99) "{ "success": true, "challenge_ts": "2016-03-07T11:28:33Z", "hostname": " www.shopat86.co.uk " }" array(3) { ["success"]=> bool(true) ["challenge_ts"]=> string(20) "2016-03-07T11:28:33Z" ["hostname"]=> string(18) " www.shopat86.co.uk " }
Many thanks
Please Log in or Create an account to join the conversation.
So from what I can see it's working just fine.
The system gets the success answer from ReCaptcha when the captcha entered is correct like in this test.
And since all the change your hosting company did is to force the success answer, it means that the plugin was already working.
You probably just had entered a wrong captcha when you tested or they changed something on their end to allow the plugin to contact the Recaptcha server.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12
- Thank you received: 0
After enabling The Hikashop Captcha, I got the same error.
Please check attached file.
I changed this code
Thanks,
Please Log in or Create an account to join the conversation.
Try changing the line:
if (trim($answers) == true) {
to:
if ($answers == true) {
in the original plugin.
This has worked.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Sorry I've spotted another issue when recaptcha is enabled.
When you have the guest checkout option enabled and try to checkout as a guest there is no captcha to fill out and the message it:
Error
The CAPTCHA solution was incorrect
Which stops checkout as a guest.
Any solutions please? Thanks.
Please Log in or Create an account to join the conversation.
It's probably because of the way you configured the Captcha plugin to display.
Make sure that you set the display after option of the plugin to "email" and not "password". Because otherwise, the captcha won't display with the guest form since there is no password field.
Please Log in or Create an account to join the conversation.
grayt7 wrote: Thanks Nicolas
Try changing the line:
if (trim($answers) == true) {
to:
if ($answers == true) {
in the original plugin.
This has worked.
Dear Nicolas,
This didnt work for me, i still got the error <i>We couldn't contact the reCAPTCHA server to verify your answer. Please try again.</i>
Do you have any other suggestions?
Please Log in or Create an account to join the conversation.
Download again the install package of the reCaptcha plugin on our website and install it on yours. The package there has the necessary modifications to work properly.
So if that still doesn't work after that, there is a problem with the settings of your plugin or your server.
Please Log in or Create an account to join the conversation.