I’m getting intermittent Error 101 connection reset and Error 15 Socket Not Connected from my dev server after switching database drivers. The reason seems to be the PDO Sqlsrv drivers I’m trying to use to connect to a SQL Server 2005 database using the SQL Server 2008 R2 SQL Native Client.
My windows event log shows this in Application Errors right at the time of each failure:
:
Faulting application path: C:\wamp\bin\apache\apache2.2.17\bin\httpd.exe
Faulting module path: c:\wamp\bin\php\php5.2.11\ext\php_pdo_sqlsrv_52_ts_vc6.dll
The server is Windows Server 2008 R2 running Apache 2.2.17 from WAMPServer 2.1, the issue occurs on both PHP version 5.2.11 and 5.3.9. The old mssql driver worked fine on 5.2.11.
I got the latest versions of the drivers from the official Sqlsrv driver project on codeplex. I’m using the Thread Safe version of the drivers as I’m using thread safe PHP. I confirmed thread safety is not the issue/ I used the VC6 version of the drivers with PHP 5.2.11 as my copy was compiled with VC++ 6, and I used the VC9 versions of the driver with 5.3.9 as it’s compiled with VC9.
What is the problem or how can I isolate it?
This was apparently the result of an incorrect server configuration. Reinstalling the server from scratch and using PHP 5.3.9, Apache 2.2.21 and the sqlsrv driver 2.0 worked with fresh copies of the php.ini and httpd.conf files. I believe I improperly copied some settings from the old server’s configuration which caused wonky behavior.