Form with ReCaptcha generates server error

Issues related to forms.
Post Reply
glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Form with ReCaptcha generates server error

Post by glasshoppa » Wed Jan 09, 2019 7:18 pm

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!

User avatar
Pablo
Site Admin
Posts: 2975
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post by Pablo » Wed Jan 09, 2019 9:36 pm

Did you upload all files?
Also note that reCaptcha requires PHP 5.6 or newer

glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post by glasshoppa » Thu Jan 10, 2019 12:04 am

All files uploaded. Host is iPower, PHP version is 5.5 -- I will see if they will upgrade. Thank you.

glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post by glasshoppa » Thu Jan 10, 2019 1:10 am

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.

User avatar
Pablo
Site Admin
Posts: 2975
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post by Pablo » Thu Jan 10, 2019 9:55 pm

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.

glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post by glasshoppa » Thu Jan 10, 2019 10:45 pm

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?

User avatar
Pablo
Site Admin
Posts: 2975
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post by Pablo » Fri Jan 11, 2019 6:59 am

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 .

glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post by glasshoppa » Thu Feb 07, 2019 4:20 pm

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?

User avatar
Pablo
Site Admin
Posts: 2975
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post by Pablo » Thu Feb 07, 2019 9:26 pm

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

glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post by glasshoppa » Thu Feb 07, 2019 11:23 pm

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 ...

Post Reply