I'm using sqlsrv module with PHP 7.0.33, Apache 2.2.34 on MacOS Catalina (10.15.7).
The execution of sqlsrv_connect in this code block
$serverName = "192.168.4.14";
$connectionInfo = array(
"Database" => "mydatabase",
"UID" => "myusername",
"PWD" => "mypassword"
);
// Create connection
$conn = sqlsrv_connect($serverName, $connectionInfo);
gives me the error
[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]
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:
Here are the details about pdo_sqlsrv module given by info.php:
And sqlsrv module:
Do you have any suggestion about what else may I check to found the cause of the error?
Thank you all in advance.
EDIT: the info.php shows me that in the configure command was used --with-openssl=/Applications/MAMP/Library which is the v1.0.2o.


