title: PHP 7.0.33 with sqlsrv gives error "SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed]"
body: <p>I'm using sqlsrv module with PHP 7.0.33, Apache 2.2.34 on MacOS Catalina (10.15.7).</p>
  <p>The execution of <code>sqlsrv_connect</code> in this code block</p>
  <pre class="lang-php prettyprint-override"><code>$serverName = &quot;192.168.4.14&quot;;
  $connectionInfo = array(
      &quot;Database&quot; =&gt; &quot;mydatabase&quot;,
      &quot;UID&quot; =&gt; &quot;myusername&quot;,
      &quot;PWD&quot; =&gt; &quot;mypassword&quot;
  );
  // Create connection
  $conn = sqlsrv_connect($serverName, $connectionInfo);
  </code></pre>
  <p>gives me the error</p>
  <p><em>[Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed]</em></p>
  <p>I have more versions of PHP installed on my Mac, so I supposed this was the cause of the error, but opening the info.php page, it tells me that the OpneSSL module is loaded:</p>
  <p><a href="https://i.stack.imgur.com/v3T32.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v3T32.png" alt="enter image description here" /></a></p>
  <p>Here are the details about <code>pdo_sqlsrv</code> module given by info.php:</p>
  <p><a href="https://i.stack.imgur.com/ERDat.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ERDat.png" alt="enter image description here" /></a></p>
  <p>And <code>sqlsrv</code> module:</p>
  <p><a href="https://i.stack.imgur.com/6vzYi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6vzYi.png" alt="enter image description here" /></a></p>
  <p>Do you have any suggestion about what else may I check to found the cause of the error?</p>
  <p>Thank you all in advance.</p>
  <p>EDIT: the info.php shows me that in the configure command was used <code>--with-openssl=/Applications/MAMP/Library</code> which is the v1.0.2o.</p>