I am working with symfony 3.3.10, php5.6.31 and I tried several times to connect doctrine to SQL Server 2005 database. I already installed the driver to use sqlsrv and pdo_sqlsrv. Here are my config files:
php.ini
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
symfony config.yml
driver: pdo_sqlsrv
host: server_addr
port: 1433
dbname: dbname
user: db_user
password: db_p@ssw0rd
That is my config, now when I try to do something with doctrine it raises the following errors:
Using pdo_sqlsrv as driver
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]ODBC Driver 11 f
or SQL Server does not support connections to SQL Server 2000 or earlier ve
rsions.[PDOException]
SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]ODBC Driver 11 f
or SQL Server does not support connections to SQL Server 2000 or earlier ve
rsions.
Using sqlsrv as driver
[Doctrine\DBAL\Driver\SQLSrv\SQLSrvException]
SQLSTATE [IMSSP, -33]: Invalid value type for option Database was specified
. String type was expected.
my phpinfo() has no problems and is detectig both php_sqlsrv and php_pdo_sqlsrv
Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, sqlsrv, phar
PDO drivers
mysql, odbc, pgsql, sqlite, sqlsrv
Thanks in advance and sorry for bad English.
My SQL Server version output is:
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 6.0 (Build 6002: Service Pack 2)