reCAPTCHA: Enter the validation code shown

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
saleh
User
Posts: 470

reCAPTCHA: Enter the validation code shown

Post by saleh »

hello

localhost Works successfully

But the website in the Internet does not work

Error message:
Enter the validation code shown

What's the solution ?


mobhar
User
Posts: 11660

Post by mobhar »

Make sure you have already uploaded ALL the script files to your production server.


saleh
User
Posts: 470

Post by saleh »

Yes sure and Problem
Works successfully on localhost But does not work on the site

These are all folders and files:
C:\xampp\htdocs\t\ReCaptcha
C:\xampp\htdocs\t\ReCaptcha\ReCaptcha.php
C:\xampp\htdocs\t\ReCaptcha\RequestMethod.php
C:\xampp\htdocs\t\ReCaptcha\RequestParameters.php
C:\xampp\htdocs\t\ReCaptcha\Response.php
C:\xampp\htdocs\t\ReCaptcha\RequestMethod
C:\xampp\htdocs\t\ReCaptcha\RequestMethod\Curl.php
C:\xampp\htdocs\t\ReCaptcha\RequestMethod\CurlPost.php
C:\xampp\htdocs\t\ReCaptcha\RequestMethod\Socket.php
C:\xampp\htdocs\t\ReCaptcha\RequestMethod\SocketPost.php

Also exists fell inadvertently
C:\xampp\htdocs\t\ReCaptcha\RequestMethod\Post.php

Does not work on the site


Webmaster
User
Posts: 9425

Post by Webmaster »

Make sure you have PHP >= 5.5 on your server and you have entered your own public and private keys for reCAPTCHA. Read the important notes of the extension when you enable it.


mobhar
User
Posts: 11660

Post by mobhar »

What PHPMaker version are you using? If you are using v2018, then make sure the PHP version you are using in your production server is >= v5.5.

See "System Requirements" in http://www.hkvstore.com/phpmaker/download.asp


saleh
User
Posts: 470

Post by saleh »

activate in Server
Requires PHP extension php_openssl.dll.

how do I make sure ? Make sure you have PHP> = 5.5 on your server


mobhar
User
Posts: 11660

Post by mobhar »

Simply create a new .php file in the root of your web application, for example, save it as "testmyphpversion.php", and put the following code in that file:

<?php
phpinfo();
?>

afterwards, access that .php file via browser, for example (adjust yourdomain with your actual domain): www . yourdomain.com/testmyphpversion.php


saleh
User
Posts: 470

Post by saleh »

Activation : extension=php_openssl.dll
PHP 7.2 Install Now Also does not work
The keys are installed
Works on local server But does not work on the site


mobhar
User
Posts: 11660

Post by mobhar »

  1. Did you use also reCAPTCHA in your localhost?
  2. Have you already defined the "ReCaptchaPublicKey" and "ReCaptchaPrivateKey" from "Tools" -> "Extensions" -> "reCAPTCHA"?

saleh
User
Posts: 470

Post by saleh »

Adding reCAPTCHA to your site

Label(reCAPTCHA v2)
Domains
(one per line)
my Domains
localhost

"Tools" -> "Extensions" -> "reCAPTCHA"
Site key=ReCaptchaPublicKey
Secret key =ReCaptchaPrivateKey

Works on local server


mobhar
User
Posts: 11660

Post by mobhar »

Try to remove "localhost" from "Domains" section, and leave only your domain there, and try again.


saleh
User
Posts: 470

Post by saleh »

Hello
I Try removing "Localhost" from the "Domains" section, leaving your domain only, then try again.
And the same problem


andiamo2018
User
Posts: 2

Post by andiamo2018 »

Hi everyone!

Fortunally, I've got the reverse problem, until one week ago reCAPTCHA working fine both localhost and website domain, but now doesn't work in my localhost but only with domain!

When I do all the recognize operation with reCAPTCHA and I submit page, PHPMaker asks me to "Insert validation code showed" and warnings below appear above the webpage and they don't allow me to validate login.

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in C:\xampp\htdocs\ReCaptcha\RequestMethod\Post.php on line 68
Warning: file_get_contents(): Failed to enable crypto in C:\xampp\htdocs\ReCaptcha\RequestMethod\Post.php on line 68
Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: operation failed in C:\xampp\htdocs\ReCaptcha\RequestMethod\Post.php on line 68

I tried with two newest keys (Private and Public) without results!

I suppose there is a problem with Google API, something's changed.
I hope someone tells me about this problem and I hope domain continues working...
Thanks in advance.


Webmaster
User
Posts: 9425

Post by Webmaster »

Google "Setting Up cURL SSL/TLS Certificate Authority Certificates".


andiamo2018
User
Posts: 2

Post by andiamo2018 »

Thanks you, now It's working!

I downloaded file "cacert.pem" and after I configure in my php.ini the following row:

openssl.cafile=c:\ca\cacert.pem


saleh
User
Posts: 470

Post by saleh »

php73 Installed
7.3.4-1.1.1.cpanel Unaffected
Package that installs PHP 7.3

pico /usr/local/lib/php.ini

;extension=php_openssl.dll
Change to
extension=php_openssl.dll

What is the solution to work recaptcha

Type reCAPTCHA: Version 2 - checkbox or reCAPTCHA - v3 version does not work

It works but after choosing the correct message appears
Enter the validation code shown


arbei
User
Posts: 9288

Post by arbei »

You may check and make sure allow-url-fopen is enabled in php.ini, see https://php.net/manual/en/filesystem.co ... -url-fopen.


saleh
User
Posts: 470

Post by saleh »

Enabled
allow_url_fopen = On


Post Reply