title: Error with fsockopen() and SSL, 'Failed to enable crypto'
body: <p>I am trying to connect to the Nominet EPP test bed, but I am receiving a 'Failed to enable crypto' which seems to be a rare error with no documented solution or cause.</p>
  
  <p>With the line:</p>
  
  <pre><code>$socket = fsockopen('ssl://testbed-epp.nominet.org.uk', 700, $errno, $errst, 10);
  </code></pre>
  
  <p>The exact error I am getting is:</p>
  
  <pre><code>Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /path/classes/nominet_epp.class.php on line 53
  
  Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://testbed-epp.nominet.org.uk:700 (Unknown error) in /path/classes/nominet_epp.class.php on line 53
  </code></pre>
  
  <p>As far as I can tell OpenSSL is installed with PHP fine, as per this in our phpinfo():</p>
  
  <pre><code>OpenSSL support     enabled
  OpenSSL Version     OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
  </code></pre>
  
  <p>The Nominet docs briefly mention "In order to verify the identity of the secure server you will need the <em>Verisign Class 3 Public Primary Certification Authority' root certificate available free from www.verisign.com (the certificate is also distributed with most web browsers).</em> - This could possibly be the issue?</p>
  
  <p><strong>Update</strong>
  As requested, I have var_dump'd the error values as well as $socket itself, they are all false/0. The <a href="http://uk.php.net/fsockopen" rel="nofollow">fsockopen PHP docs</a> states "<em>If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket.</em>"</p>
  
  <p>Any help would be greatly appreciated.</p>