PDO_MSSQL and SQL Server 7

I have a problem establishing a connection to SQL Server 7 on another server using PDO / PHP. Everything works fine on winning 2003 32 bit / apache / php 5.2.5, but I get a server that is not found when the service is on winning 2008R2 64bit / apache / php5.2.5. The user / password is correct, the firewall is configured.

I check that PHP does not use port 1433, but try connecting to 445 and 139 ports.

Any idea?

Stephen

+4
source share
2 answers

Update

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

+2
source

In your PDO statement, the first parameter will make good use of this form: "MSSQL: host = x.x.x.y; port = xxxy; dbname = XXXXXXX;" Pay attention to the inclusion of the port.

0
source

Source: https://habr.com/ru/post/1443809/


All Articles