Page 1 of 1

Form with ReCaptcha generates server error

Posted: Wed Jan 09, 2019 7:18 pm
by glasshoppa
A 500 server error results when trying to load my form when a ReCaptcha is included. Chat with host support resulted in this conclusion:

Image

I'm stumped. Can you help? Many thanks!

Re: Form with ReCaptcha generates server error

Posted: Wed Jan 09, 2019 9:36 pm
by Pablo
Did you upload all files?
Also note that reCaptcha requires PHP 5.6 or newer

Re: Form with ReCaptcha generates server error

Posted: Thu Jan 10, 2019 12:04 am
by glasshoppa
All files uploaded. Host is iPower, PHP version is 5.5 -- I will see if they will upgrade. Thank you.

Re: Form with ReCaptcha generates server error

Posted: Thu Jan 10, 2019 1:10 am
by glasshoppa
PHP was upgraded; here is full text of current server error:

Warning: require_once(./ReCaptcha/ReCaptcha.php): failed to open stream: No such file or directory in /hermes/bosnaweb16a/b1587/ipw.glasshoppacom/public_html/Contact.php on line 2 Fatal error: require_once(): Failed opening required './ReCaptcha/ReCaptcha.php' (include_path='.:/usr/local/lib/php-5.6.30-precise/lib/php') in /hermes/bosnaweb16a/b1587/ipw.glasshoppacom/public_html/Contact.php on line 2

Sounds like a missing file but I don't know what it is or where to find it ... Thanks in advance for pointing me in the right direction.

Re: Form with ReCaptcha generates server error

Posted: Thu Jan 10, 2019 9:55 pm
by Pablo
Please make sure all files are uploaded, Included the files in the folder "ReCaptcha"
Also make sure the casing of the folder name and file names is correct.

Re: Form with ReCaptcha generates server error

Posted: Thu Jan 10, 2019 10:45 pm
by glasshoppa
Sorry, no folder called ReCaptcha is published with my form. I am following instructions in the QEW v6 pdf. I am publishing to a local directory and uploading with FileZilla. Every file published with the site is mirrored on the server. Where should the ReCaptcha folder be?

Re: Form with ReCaptcha generates server error

Posted: Fri Jan 11, 2019 6:59 am
by Pablo
The 'Recaptcha' folder will be generated when you publish the page.
This folder must also be uploaded to the server.

Or use the built-in FTP to publish the pages, then all files will be uploaded to the correct folder automatically .

Re: Form with ReCaptcha generates server error

Posted: Thu Feb 07, 2019 4:20 pm
by glasshoppa
The form works fine until ReCaptcha is added. Keys are correct. Uploaded all files. Here is text of error:

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /hermes/bosnaweb16a/b1587/ipw.glasshoppacom/public_html/ReCaptcha/RequestMethod/Post.php on line 68 Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify): failed to open stream: no suitable wrapper could be found in /hermes/bosnaweb16a/b1587/ipw.glasshoppacom/public_html/ReCaptcha/RequestMethod/Post.php on line 68 The reCAPTCHA code is incorrect. Please try again. Response from reCAPTCHA server: invalid-json

Any ideas?

Re: Form with ReCaptcha generates server error

Posted: Thu Feb 07, 2019 9:26 pm
by Pablo
Something seems to be wrong with your configuration. I need to see the PHP code to be able to help you.

It looks like the web server is blocking the functionality:
Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in

Re: Form with ReCaptcha generates server error

Posted: Thu Feb 07, 2019 11:23 pm
by glasshoppa
I contacted the host again -- they needed to "enabled allow_url_fopen for PHP"

And that took care of it.

Thanks for your willingness to help ...