stefan.m
stefan.m

Reputation: 58

PDO_MSSQL and SQL Server 7

I have problem with establish connection with sql server 7 on different server using PDO/PHP. All works perfect on win 2003 32 bit/apache/php5.2.5 but I receive server not found when service is on win 2008R2 64bit/apache/php5.2.5. User/password are correct, firewall configured.

I check, that PHP don't use 1433 port but try connect with 445 and 139 ports.

Any idea?

Stefan

Upvotes: 4

Views: 459

Answers (2)

Andrew Templeton
Andrew Templeton

Reputation: 1696

In your PDO statement, the first param would do well to take this form: "mssql:host=x.x.x.x;port=xxxx;dbname=xxxxxxx;" Notice the inclusion of port.

Upvotes: 0

ajtrichards
ajtrichards

Reputation: 30565

Updated;

You could use the PDO ODBC connection option: PHP: PDO_ODBC DSN. I've used this method previously to connect from Win 2003 and 2008 to a SQL Server

Upvotes: 2

Related Questions