ID: 29074 Comment by: pretenda at pretenda dot com Reported By: david dot blair at nsi1 dot com Status: Open Bug Type: MSSQL related Operating System: MS 2003 PHP Version: 4.3.7 New Comment:
I am also having the same problem. I have been searching high and low for an answer, but have found none. I ended up creating a loop in my PHP connect code too, and it has attempted to connect more than once, 27 times on my development server in the past week. I am running the following: Windows 2003 Server IIS6 PHP 5.01 SQL Server 2000 SP3 A also previously had the issue on 4.3.8, which didn't fail as often. Unfortunately I need some of the features of PHP5 on my new website. Cheers, Matt Previous Comments: ------------------------------------------------------------------------ [2004-09-21 23:57:14] david dot blair at nsi1 dot com Charles, this doesn't explain why newer versions of PHP cause the error more frequently than older versions, when everything else about our systems remains the same. This also doesn't explain why PHP is the only thing having issues that contacts my SQL server. I'll try your work-around tomorrow and monitor the server for a few weeks to see what happens. It's a step in the right direction to finding a solution if it does help, but I still see it as a work-around, not a solution. ------------------------------------------------------------------------ [2004-09-21 23:36:13] phpbugreport at workboy dot com This bug should probably be closed. The problem is on the MSSQL end and ban be resolved by changing the value of the winsocklistenbacklog registry entry. For those who are experiencing this problem, please see http://support.microsoft.com/default.aspx?kbid=328476 I don't know why this also affects mssql_select_db, but they do appear to go together. ------------------------------------------------------------------------ [2004-09-13 00:42:39] phpbugreport at workboy dot com Upgrading seems to make things worse. I upgraded to freetds-0.62.4, php-4.3.9RC2 (4.3.8 has a compile issue with freetds-0.62.4 according to bug reports), and apache 1.3.31. Now in addition to mssql_connect failures I also get mssql_select_db failures for one of our busier databases. Could it be that php/freetds is getting too fast and giving up before a response is received from SQL 2000? Charles Bennigton Oddcast, Inc. ------------------------------------------------------------------------ [2004-09-11 22:13:08] phpbugreport at workboy dot com We are currently running apache_1.3.28, freetds-0.61.2 and php-4.3.3 on linux 2.4.x kernels and experiencing the same problem connecting to a SQL 2000E SP3 database. Modifying our PHP db connection classes to immediately try mssql_connect again when it fails produces the desired results most of the time. However not always. I will be upgrading to the latest and greatest in the current major version for all of the components on the Linux side and testing more. I will post a follow up then. Charles Bennington Oddcast, Inc. ------------------------------------------------------------------------ [2004-08-31 16:13:34] david dot blair at nsi1 dot com I've never had Apache hang before but I'm also not running through TDS. I just tried upgrading the production server to 5.0.1 last night. I've been running 5.0.0 on the development server and 5.0.1 on my laptop for two weeks/one week with no problems. The database connection failed 6 times last night after we brought everything back up. After 2 more failures this morning I rolled everything back. Oh hell, I just remembered I left php_mssql.dll from the 5.0.1 build in the windows directory...I think I'm going to leave it in there and see what happens...two of us have tested the system with no crashes so far... More info as it comes in... ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29074 -- Edit this bug report at http://bugs.php.net/?id=29074&edit=1