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 »

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: 3915
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post by Pablo »

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 »

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 »

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: 3915
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post 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.
glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post 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?
User avatar
Pablo
Site Admin
Posts: 3915
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post 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 .
glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

Post 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?
User avatar
Pablo
Site Admin
Posts: 3915
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: Form with ReCaptcha generates server error

Post 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
glasshoppa
Posts: 17
Joined: Sun Jan 25, 2015 3:38 am

Re: Form with ReCaptcha generates server error

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