title: Odd cURL Error - errno 104 (Code 56) In WHMCS
body: <p>Have just installed WHMCS on my CentOS 6.0 x86 VPS server with cPanel. I've tired to use the WHM Import tool and I'm receiving the following error:</p>
  
  <pre><code>SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 (Code 56) - Check IP/Blocked Firewall Ports
  </code></pre>
  
  <p>The error appears immediately after clicling the Get Accounts button and doesn't appear to need to think about anything before firing back the error. I have my server correctly set-up in WHMCS and have checked the cURL error on the cURL website which says it's a 'failure with receiving network data', which doesn't really help too much! The same error occurs whether I connect via http or https.</p>
  
  <p>I actually had this on my last VPS server too. The error was the same but would occassionally not display, though the data was also never returned. However I was just about to move servers at that point so didn't investigate the issue further. My hope was that the issue wouldn't follow me. Unfortnately it has! The server in that instance was CentOS 5.7 x64</p>
  
  <p>The only question on StackOverflow that seems relevant mentions enabling OpenSSL extension. However this is only for Windows so isn't useful to me. Other problems around the net seem vauge and related to a vast arrange of different things. Usually Facebook app developers complaining of receiving the error back within their app. One person said the connection you're on can cause it but have confirm the error both via a home connection and a corporate network. Seemed unlikely anyway!</p>
  
  <p>I can confirm that PHP has been compiled with OpenSSL, I have '--with-openssl=/usr' '--with-openssl-dir=/usr' in my PHP info information. It has also been compiled with cURL --with-curl=/opt/curlssl/' '--with-curlwrappers' and cURL tests seem to return fine. cURL is showing the following info:</p>
  
  <pre><code>cURL Version 7.21.6
  SSL Version OpenSSL/1.0.0
  ZLib Version 1.2.3
  </code></pre>
  
  <p>Have checked the bitfields for the features and they come back as expected:</p>
  
  <pre><code>CURL_VERSION_IPV6 matches
  CURL_VERSION_KERBEROS4 does not match
  CURL_VERSION_SSL matches
  CURL_VERSION_LIBZ matches
  </code></pre>
  
  <p>Also an array dump of the curl_version. Nothing looks out of the ordinary, but thought I'd post for completeness:</p>
  
  <pre><code>Array ( [version_number] =&gt; 464134 [age] =&gt; 3 [features] =&gt; 1565 [ssl_version_number] =&gt; 0 [version] =&gt; 7.21.6 [host] =&gt; i686-pc-linux-gnu [ssl_version] =&gt; OpenSSL/1.0.0 [libz_version] =&gt; 1.2.3 [protocols] =&gt; Array ( [0] =&gt; dict [1] =&gt; file [2] =&gt; ftp [3] =&gt; ftps [4] =&gt; gopher [5] =&gt; http [6] =&gt; https [7] =&gt; imap [8] =&gt; imaps [9] =&gt; pop3 [10] =&gt; pop3s [11] =&gt; rtsp [12] =&gt; smtp [13] =&gt; smtps [14] =&gt; telnet [15] =&gt; tftp ) )
  </code></pre>
  
  <p>I have contacted WHMCS support and they advised that it could be an SSL config problem on my server. Whilst SSL wasn't set-up for the domain when I logged the ticket as I didn't think it was a requirement to connect via SSL in order to use this tool, having used it in the past via http with no problems. In fact I think it uses port 2086 to communicate with the server, thought I could be wrong! Either way I have now ruled this out as SSL is working fine for the domain and server now. As it is they believe it to be a configuration problem with my server rather than a problem with WHMCS so have passed the issue back, which is fair enough. I can't really argue and assume it would effect others, which I haven't been able to find evidence of. However I'm still at a bit of a loss. Unfortunately my VPS is unmanaged so can't ask anyone to login and take a look, though what they'd look for I'm not sure.</p>
  
  <p>Finally here's a list of things I have tried to see if I could get it to react any differently:
  * Disabled the CSF firewall at all stages of testing
  * Accessing the install via server IP rather than domain name
  * Allowing WHM/cPanel to connect on port 2086</p>
  
  <p>I guess the only thing I haven't done is rebuild Apache, but doubt that is going to resolve anything. Want to avoid doing that if possible. I suppose I can just ignore the problem for now and input the accounts manually, there aren't loads. However I'm loathed to gloss over it in case there is a config issue with my server that bites me harder further down the line. Equally if there is quirk or bug in the WHMCS software then I would like to be able to nail it down for them so that I can get up and running myself and avoid others from being effected. They seem pretty sure it isn't a bug in the codebase and without being able to see the code I can't say for sure myself. However I assume it's a fairly mature part of their app so for now I'm looking closer to home</p>
  
  <p>Any ideas or experiences like this out there that might shed some light on what is going on?</p>
  
  <p>Cheers!</p>