The plugin uses a PHP function called file_get_contents()
to confirm with Google that you successfully answered the Recaptcha, and it seems that function isn’t working for you. (https://stackoverflow.com/questions/27613432/file-get-contents-not-working has some explanation of why not).
@sniedzwiecki do you have access to your server’s php.ini file? If so, you need to make sure the setting allow_url_fopen
is set to On
or 1
. I suspect it’s currently set to Off
or 0
.
Another solution involves making a code change.
@megnicholas I would suggest changing the current implementation of csf_RecaptchaV2::SubmitHTTPGet()
to be
static function SubmitHTTPGet( $path, $data ) {
$req = self::EncodeQS( $data );
$response_obj = wp_remote_get( $path . $req );
$response = wp_remote_retrieve_body($response_obj);
return $response;
}
notice it’s usingwp_remote_get
instead offile_get_contents()
. I foundwp_remote_get
works even when I haveallow_url_fopen=Off
.
-
This reply was modified 5 years, 9 months ago by Michael Nelson. Reason: fix formatting errors