I have two servers which can no longer connect to MSSQL after this upgrade. PHP versions 7.1.x, 7.2.x and 7.3.x are all affected. 7.0.x and earlier can still connect fine.
Simple connection script
$serverName = "myserver";
$uid = "myuid";
$pwd = "mypassw";
$databaseName = "mydb";
$connectionInfo = array( "UID"=>$uid,
"PWD"=>$pwd,
"Database"=>$databaseName);
$conn = sqlsrv_connect($servername, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r(sqlsrv_errors(), true));
}
Results is
Connection could not be established.
Array ( [0] => Array ( [0] => IM004 [SQLSTATE] => IM004 [1] => 0
Simple connection script
$serverName = "myserver";
$uid = "myuid";
$pwd = "mypassw";
$databaseName = "mydb";
$connectionInfo = array( "UID"=>$uid,
"PWD"=>$pwd,
"Database"=>$databaseName);
$conn = sqlsrv_connect($servername, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r(sqlsrv_errors(), true));
}
Results is
Connection could not be established.
Array ( [0] => Array ( [0] => IM004 [SQLSTATE] => IM004 [1] => 0
Code:
=> 0 [2] => [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed [message] => [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed ) )
I have fallen back to PHP 7.0 in the meantime, where the above script work fine. It was working fine until Plesk patch #53 was applied yesterday.