Using Curl as RequestMethod
-
My sysadmin has “allow_url_fopen” disabled on the server for security reason and I’m not able to change this.
PHP Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in …
I looked through the source and I do see that Curl is available as an option, however I don’t see where this can be changed in the configuration.
I was able to manually modify the plugin to force Curl to be used, but I’m afraid this won’t be upgrade safe.
My changes to /wp-content/plugins/advanced-google-recaptcha/vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php (line 144)
$this->requestMethod = (is_null($requestMethod)) ? new RequestMethod\Post() : $requestMethod;
changed to:
$this->requestMethod = (is_null($requestMethod)) ? new RequestMethod\CurlPost() : $requestMethod;
—
This is called from advanced_google_recaptcha_validate_posted_captcha() in the core.php but my PHP knowledge is not enough to figure out how to make this work.
Any help or suggestions to make changes that are upgrade safe are much appreciated.
Thanks.
- The topic ‘Using Curl as RequestMethod’ is closed to new replies.