Error connecting to MSSQL with SQLSrv and PHP 5.4.7

前端 未结 2 1113
南笙
南笙 2021-01-21 18:51

I\'m trying to connect to an MSSQL database with PHP and encounter a very frustrating error while trying to connect. It loads for a minute, before printing out the following mes

2条回答
  •  旧巷少年郎
    2021-01-21 19:33

    I ran into the same problem but I found that I did not need to use the IP address, the server name worked just fime. Also I was not sure what port my server was using, I found the information here: How to find the port for MS SQL Server 2008?

    I also found the following links helpful in getting PDO to work:

    PHP PDO Connection to SQL Server with integrated security?

    Use of PDO in classes

    MS SQL Server (PDO) — Microsoft SQL Server Functions (PDO_SQLSRV)

    I know ncksllvn solved his problem so I hope this helps whoever else visits!

提交回复
热议问题