Title: Curl error
Last modified: August 31, 2016

---

# Curl error

 *  ResolvedModerator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 12 months ago](https://wordpress.org/support/topic/curl-error-9/)
 * I have several WP sites on my server, but only one running 4.6 alpha. This one
   reports the following when trying to run a scan:
 * Scan terminated with error: There was an error connecting to the the Wordfence
   scanning servers: cURL error 3: malformed
 * Alpha version is 4.6-alpha-37518).
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

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

 *  [wflandon](https://wordpress.org/support/users/wflandon/)
 * (@wflandon)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410591)
 * Hi sterndata,
 * Wordfence has a fallback if curl is not available. So it must be available but
   failing. This is either a bug with WordPress, or Wordfence will need to be changed
   before the next release. I will pass this on to the dev team and see what they
   say.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 11 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410592)
 * thanks. I’ll mark this as resolved for now.
 * still happening with 4.6-alpha-37597
 *  [Ramael Metatron](https://wordpress.org/support/users/rekast/)
 * (@rekast)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410610)
 * I am having this issue and I am on the public wordpress plugin repo/market place.
   Is there a correction to this issue that one can apply?
 * I am getting the error when attempting to acquire the free API key:
    “we encountered
   a problem fetching the free key: There was an error connecting to the the Wordfence
   scanning servers: cURL error 3: malformed”
 *  [scvwebfire](https://wordpress.org/support/users/scvwebfire/)
 * (@scvwebfire)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410611)
 * (I made an account to post this, so hope it helps)
 * After digging with debugger for a few hours. I found the issue in a new part 
   of WP.
 * In: wp-includes/class-reuqests.php
    Lines: 593-597
 *     ```
       if ($options['idn'] !== false) {
       			$iri = new Requests_IRI($url);
       			$iri->host = Requests_IDNAEncoder::encode($iri->ihost);
       			$url = $iri->uri;
       		}
       ```
   
 * In class Request_IRI, $this->uri seems to be never set.
 * Dirty fix:
 *     ```
       if ($options['idn'] !== false) {
       			$iri = new Requests_IRI($url);
       			$iri->host = Requests_IDNAEncoder::encode($iri->ihost);
       //			$url = $iri->uri;
       		}
       ```
   
 * And wordfence works.
    So it’s either not a wordfence bug. Or somehow the idn 
   option needs to be false for the 4.6.x version.
 * Either way, i’ll look into it better later and make a bug report.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 10 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410612)
 * scvwebfire: Great work!
 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410621)
 * Hi all,
 * There is a change coming in the next Wordfence version to prevent this error 
   message, which will be available before WordPress 4.6 is out.
 * [@sterndata](https://wordpress.org/support/users/sterndata/): I saw that WFAsa
   already caught up with you on slack, but thought I’d reply here too, since other
   users may find this post by searching. Your post from the WP alpha did make it
   in our system, so thanks for the early warning!
 * -Matt R

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

The topic ‘Curl error’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/curl-error-9/#post-7410621)
 * Status: resolved