ID:               40034
 Comment by:       c dot pasticcio at gawab dot com
 Reported By:      chris dot clos at lmcu dot org
 Status:           Assigned
 Bug Type:         MSSQL related
 Operating System: Windows Server 2003
 PHP Version:      5.2.0
 Assigned To:      fmk
 New Comment:

We have the same problems with sevral configurations on windows 2003.
- webserver: win2k3 + Apache 2.2.9 + Php 5.2.6
- webserver: win2k3 + Apache 2.0.59 + Php 5.1.6
- db server: win2k3 + sql server 2000

We have other 2 webservers with latest Apache and Php releases running
on windows 2000 that don't suffer this problem.

On all webservers we have ntwdblib.dll version 2000.80.194.0.
On db server with win2k3 we have a ntwdblib.dll version
2000.80.2039.0.
We didn't try to change the libs yet.


Previous Comments:
------------------------------------------------------------------------

[2008-07-23 00:01:23] efesar at gmail dot com

Recently I upgraded to PHP 5.2.6 (Apache 2.2.9, Win2003 SP2, MSSQL 2000
SP4 on a separate box) from 5.1.2 (Apache 2.0.58) and this problem
suddenly reared its ugly head. Apache wouldn't connect to the database
for more than a few hours. PHP was running the "2000.2.8.0" DLL ... I
copied the "2000.80.2273.0" DLL over from the MSSQL 2000 box and
restarted the web box. 

I'm hoping this fixes the issue. We tried to use Microsoft's 2005 PHP
driver, but it was hopelessly bad at managing resources (If we ran more
than 15 calls to sqlsrv_query() in a single PHP session, it crashed PHP
and Apache consistently). 

So far, so good. If this solution doesn't work within 72 hours to fix
the problem, I'll come back to add another comment so that people
reading this bug report will know it's still a problem. Otherwise, if
I'm not back in a week or so, assume the DLL swap is the fix. 

Incidentally, we also run a PostgreSQL box. We connect to both MSSQL
and PGSQL from the same web server, and the PGSQL connection has never
failed.

------------------------------------------------------------------------

[2007-06-30 18:34:46] jmckinzie at novonics dot com

I may be having some similar behavior related to this bug. I'm having
issues with database connections dropping on a Win 2K3 box, running
Apache 1.3.37, PHP 5.1.6 and MS SQL 2005 Express. I am able to connect
most of the time using mssql_connect. However, on a consistent basis,
probably 15-45 minutes, my mssql_connect calls begin to fail with the
same message as above:

PHP Warning:  mssql_connect(): Unable to connect to server:  x.x.x.x

Restarting Apache fixes the problem and I am able to connect for a
short time. I'm using ntwdblib.dll, version 2000.80.194.0, and have not
upgraded to 2000.80.2039.0.

------------------------------------------------------------------------

[2007-01-23 05:36:47] ivanvart at gmail dot com

We have the same problem... we solved (but we dont know if is the best
option) changing the ntwdblib.dll (ver. 2000.80.2039.0) in the php
directory.

------------------------------------------------------------------------

[2007-01-22 21:18:17] tschoenbachler at eoncc dot com

I too has seen this problem on one of my customers machines and FYI,
restarting IIS temporarily fixes the problem. As a work around can I do
a regsvr32 on the new ntwdblib.dll and if so where can I get it...?

------------------------------------------------------------------------

[2007-01-12 16:30:37] [EMAIL PROTECTED]

But you are packing the dll's :-)

As far as I know different versions of ntwdblib.dll will default to
either tcpip or netbios for the default protocol. There might also be a
registry setting for this (I'll look for that tonight when I get home).

Just copying the dll to the system does not give you access to the
client configuration tools that allow you to change the defaults or
create server aliases that should be used as the host parameter for
mssql_connect().

If the newer version of ntwdblib.dll solves the problem I'd say we
should bundle it.

------------------------------------------------------------------------

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/40034

-- 
Edit this bug report at http://bugs.php.net/?id=40034&edit=1

Reply via email to