Kornatzky
Kornatzky

Reputation: 188

Connect to SQL Server 2008 from PHP

Using the PHP drivers from Microsoft, we cannot connect using either Windows Authentication or SQL Server authentication. We use the following PHP code:

$serverName =  "(A\B)";
$connectionInfo = array( "UID"=>"u1",
                         "PWD"=>"p1",
                         "Database"=>"db1"); 

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

Upvotes: 1

Views: 226

Answers (1)

Brian
Brian

Reputation: 8616

In a nutshell the php sql server stuff is terrible.

The only reliable solution (and I am forced to use SQL Server 2008 here for a very complex project) is using PHP ADODB.

Upvotes: 1

Related Questions