MS IIS PHP connection to MS SQL Server help


Windows 2012 R2 64 bit
MS IIS 8.5, PHP 7.1.1 on one server
MS SQL 2012 on a different server
Can’t connect to DB

  1. downloaded SQLSRV4.0, extracted and placed in php/ext dir
  2. added to php.ini
  3. I can see info in the phpinfo()
  4. I can run php code
  5. can NOT connect to MS SQL Server (no errors showing up, just blank page)

$serverName = “Servername”; //serverName\instanceName
$connectionInfo = array( “Database”=>“dbname”); //, “UID”=>“userName”, “PWD”=>“password” // I tried with user/pass also

$conn = sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
echo “Connection established.
echo “Connection could not be established.
die( print_r( sqlsrv_errors(), true));

Tried including username and password
Please help me connect to DB,
thank you.