SQL Server PDO error with a break

I get intermittent Error 101 connection reset and Error 15 Socket Not Connected from my dev server after switching database drivers. The reason, apparently, is the Sqlsrv PDO drivers, which I am trying to use to connect to the SQL Server 2005 database using the native SQL Server 2008 R2 client.

My Windows event log shows this in Application Errors right during every crash:

Application path failure: C: \ wamp \ bin \ apache \ apache2.2.17 \ bin \ httpd.exe
Error in module path: c: \ wamp \ bin \ php \ php5.2.11 \ ext \ php_pdo_sqlsrv_52_ts_vc6.dll

The server is Windows Server 2008 R2 with Apache 2.2.17 from WAMPServer 2.1, the problem occurs on PHP versions 5.2.11 and 5.3.9. The old mssql driver worked fine on 5.2.11.

I got the latest drivers from the official Sqlsrv driver project on codeplex . I am using the Thread Safe driver version as I am using thread safe PHP. I confirmed that thread safety is not a problem / I used the VC6 driver version with PHP 5.2.11, since my copy was compiled with VC ++ 6, and I used the VC9 driver version from 5.3.9 when it was compiled with VC9.

What is the problem or how to isolate it?

+4
source share
2 answers

This, apparently, was the result of an incorrect server configuration. By reinstalling the server from scratch and using PHP 5.3.9, Apache 2.2.21 and the sqlsrv 2.0 driver worked with fresh copies of the php.ini and httpd.conf files. I believe that I incorrectly copied some settings from the old server configuration, which caused uncomfortable behavior.

0
source

There is an updated version that adds support for SQL Server 2012, although I do not know if this will help.

http://www.microsoft.com/download/en/details.aspx?id=17308

Does the PDO driver version cause different problems?

+2
source

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


All Articles