title: How do I make php's curl accept SSLv3?
body: <p>I have the following code:</p>
  <pre><code>curl_setopt($this-&gt;curl_handle, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($this-&gt;curl_handle, CURLOPT_SSLVERSION,'all'); 
  curl_setopt($this-&gt;curl_handle, CURLOPT_SSL_VERIFYPEER, false);
  
      // set the file to be uploaded
      if (!curl_setopt($this-&gt;curl_handle, CURLOPT_FILE, $fp_to_download)) {
          throw new Exception(&quot;Could not download file $local_file&quot;);
      }
  
      // download file
      try {
          if (!curl_exec($this-&gt;curl_handle)) {
              throw new Exception(sprintf('Could not download file. cURL Error: [%s] - %s', curl_errno($this-&gt;curl_handle), curl_error($this-&gt;curl_handle)));
          }
      } catch (Exception $e) {
          $error_msg = $e-&gt;getMessage();
          // Fallback to cUrl upload
          if (strpos($error_msg, 'SSL23_GET_SERVER_HELLO')) {
              return $this-&gt;curlProcessHandler('ftp://'.preg_replace('#/+#', '/', $this-&gt;server.':'.$this-&gt;port.'/'.$remote_file), $local_file);
          } else {
              throw new Exception(&quot;Could not download file $remote_file: $error_msg&quot;);
          }
      }
  </code></pre>
  <p>When I have <code>curl_setopt($this-&gt;curl_handle, CURLOPT_SSLVERSION,'all');</code>, it returns the error:</p>
  <pre><code>Could not download file. cURL Error: [35] - error:1408F10B:SSL routines:ssl3_get_record:wrong version number
  </code></pre>
  <p>And when I have <code>curl_setopt($this-&gt;curl_handle, CURLOPT_SSLVERSION,'3');</code>, I get a different error:</p>
  <pre><code>Could not download file. cURL Error: [4] - OpenSSL was built without SSLv3 support
  </code></pre>
  <p>It seems like my version of OpenSSL doesn't support SSLv3, and I don't know how to fix this.
  I've tried different methods of changing my openssl version, but none of them worked.</p>