title: curl php error 1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
body: <p>I have a web page that calls another web page using php and curl running on IIS.</p>
  
  <p>and all of a sudden i recieve this </p>
  
  <p>error 1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version</p>
  
  <p>The curl code I have is</p>
  
  <pre><code>$ch = curl_init($url);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  </code></pre>
  
  <p>I have searched high and low and have come to the conclusion my openssl and php is way out of date</p>
  
  <p>php 5.3.27 and SSL Version  OpenSSL/0.9.8y</p>
  
  <p>I Imagine the target company's APIs i hit no longer support the lower version of this SSL</p>
  
  <p>I was after advice on how to update php_openssl.dll to fix this. I did download a new version of php (7.2) and copy the php_openssl.dll from there to the current php installation ext directory, and stop and restart IIS. I am pretty sure this is not the right way to fix, but I am not that up to date with updating dlls.</p>
  
  <p>when i rerun phpinfo.php this has no affect.</p>
  
  <p>thanks </p>