Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0.0-BETA2
-
Fix Version/s: 2.0.0-BETA4
-
Component/s: Drivers
-
Labels:None
-
Environment:Windows 7, Zend Server CE, Sql Server driver for PHP v2
Description
When connection to mssql server with pdo_sqlsrv driver you get:
[PDOException] SQLSTATE[IMSSP]: The DSN string ended unexpectedly.
Sample $connectionOptions:
$connectionOptions = array(
'dbname' => 'AdventureWorks',
'user' => 'sa',
'password' => 'sa_password',
'host' => 'local',
'driver' => 'pdo_sqlsrv'
);
Error is in Doctrine\DBAL\Driver\PDOSqlsrv\Driver in function _constructPdoDsn(array $params).
On line 53 dsn starts with
$dsn = 'sqlsrv:(';
instead of
$dsn = 'sqlsrv:server=(';
as written in offical Microsoft help which come with SQL Server Driver For PHP v2.