Title: Recaptcha validation failed
Last modified: November 1, 2019

---

# Recaptcha validation failed

 *  Resolved [omarfpg a11n](https://wordpress.org/support/users/omarfpg/)
 * (@omarfpg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/)
 * Hi there, great plugins! I just discovered them today and I’ve been setting up
   and testing them for a while.
 * Unfortunately, the reCAPTCHA seems to be failing, every time I try to register
   I get a recaptcha validation failed error (you can test it yourself here: [https://dev.mezines.com/register](https://dev.mezines.com/register)).
 * The recaptcha works fine, I’ve setup v2 keys and even lowered security to the
   minimum to test but I’m still getting the error message. I didn’t see anything
   on Chrome’s developer tools though.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frecaptcha-validation-failed-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [WP User Manager](https://wordpress.org/support/users/wpusermanager/)
 * (@wpusermanager)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12090871)
 * Hmm strange, I’ve confirmed it on your site but can’t recreate locally.
 * To debug can you do the following:
 * 1. Add this code to line 66 of the wp-content/plugins/wpum-recaptcha/includes/
   actions.php (so it’s above `return new WP_Error(...`):
 * `error_log( print_r( $resp->getErrorCodes(), true ) );`
 * 2. Can edit your wp-config.php file to replace this line –
 * define( ‘WP_DEBUG’, false );
 * With these lines –
 * define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’,
   false);
 * This means that any errors are logged to `/wp-content/debug.log’, because some
   errors are not visible on screen.
 * More details about that at
    [http://codex.wordpress.org/Editing_wp-config.php#Debug](http://codex.wordpress.org/Editing_wp-config.php#Debug)
 * Can you then retry the process and send me the debug.log file that should be 
   created.
 *  Thread Starter [omarfpg a11n](https://wordpress.org/support/users/omarfpg/)
 * (@omarfpg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12092338)
 * Thanks for the prompt reply. I got this on debug.log:
 * [03-Nov-2019 18:40:55 UTC] PHP Warning: file_get_contents(): https:// wrapper
   is disabled in the server configuration by allow_url_fopen=0 in /usr/www/users/
   cititour/dev/mezinesdev/wp-content/plugins/wpum-recaptcha/vendor/google/recaptcha/
   src/ReCaptcha/RequestMethod/Post.php on line 80
    [03-Nov-2019 18:40:55 UTC] PHP
   Warning: file_get_contents([https://www.google.com/recaptcha/api/siteverify](https://www.google.com/recaptcha/api/siteverify)):
   failed to open stream: no suitable wrapper could be found in /usr/www/users/cititour/
   dev/mezinesdev/wp-content/plugins/wpum-recaptcha/vendor/google/recaptcha/src/
   ReCaptcha/RequestMethod/Post.php on line 80 [03-Nov-2019 18:40:55 UTC] Array ([
   0] => connection-failed )
 * I’ll be doing some Google’ing while I wait for your input! Thanks again!
 *  Thread Starter [omarfpg a11n](https://wordpress.org/support/users/omarfpg/)
 * (@omarfpg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12092376)
 * I’ll ask my client if he can change allow_url_fopen=0 to 1 in php.ini so we can
   test while we wait to hear from you and see if there’s a better solution. I’ll
   keep you posted!
 *  Thread Starter [omarfpg a11n](https://wordpress.org/support/users/omarfpg/)
 * (@omarfpg)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12092498)
 * We did the change on a user.ini and it’s working great now. Thanks! I’ll still
   wait for your reply maybe there’s a better solution you can provide.
 *  Plugin Author [WP User Manager](https://wordpress.org/support/users/wpusermanager/)
 * (@wpusermanager)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12092558)
 * I’ve just released version 2.0.4 which forces the Google ReCaptcha library to
   use WordPress native code to perform requests, instead of using file_get_contents,
   which might be disabled as it is on your client’s server.
 * Let me know how that works out.
 *  Thread Starter [omarfpg a11n](https://wordpress.org/support/users/omarfpg/)
 * (@omarfpg)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12148737)
 * Sorry for the late reply! I didn’t catch this one before, but yeah I wanted to
   let you know it worked! We pushed the site live and the update did the trick 
   there, no need to do the allow_url_fopen workaround anymore.
 * Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Recaptcha validation failed’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpum-recaptcha_f0efe8.svg)
 * [WP User Manager reCAPTCHA Lite](https://wordpress.org/plugins/wpum-recaptcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpum-recaptcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpum-recaptcha/)
 * [Active Topics](https://wordpress.org/support/plugin/wpum-recaptcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpum-recaptcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpum-recaptcha/reviews/)

 * 6 replies
 * 1 participant
 * Last reply from: [omarfpg a11n](https://wordpress.org/support/users/omarfpg/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/recaptcha-validation-failed-2/#post-12148737)
 * Status: resolved