ID:               40034
 Updated by:       [EMAIL PROTECTED]
 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:

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.


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

[2007-01-12 14:11:43] [EMAIL PROTECTED]

Sorry, I'm not the MSSQL intiated :)

Frank, could you take a look please?

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

[2007-01-05 15:23:46] chris dot clos at lmcu dot org

Description:
------------
I have PHP 5.1.4 and upgraded to php 5.2.0.  Copied my php.ini file
over.  I use IIS in Server 2003 (Standard) SP1, connecting to SQL
Server 2005 (Standard).  

I can no longer do mssql_connects, instead I get an error.

Once I did this I get an error: 

PHP Warning:  mssql_connect(): Unable to connect to server:  x.x.x.x in
C:\db-test.php on line 3

This is the same thing that happens when using it via IIS (using
php5isapi) or the php command line.  This does work on a Windows XP SP2
machine just fine.  I can reproduce this other Windows Server 2003
machines.  

I read from bug Id 39313, and I have tried loading the client tools,
however I do not see anywhere that there is a NETBIOS or a TCP/IP type
setting in SQL Server Management Studio.  

After looking long and deep, I found that its the version of
ntwdblib.dll that is provided with php package.  I found one that is
version "2000.80.194.0" that fixes it, but the one included is
"2000.2.8.0"

Same problem appears to happen with 5.1.4 and this version of dll, I
think this file needs to be updated in the distribution.

Reproduce code:
---------------
<?php

$dbh = mssql_connect('x.x.x.x','user','password');

if($dbh) {
 echo "true\r\n";
} else {
        echo "fubar\r\n";
}
?>


Expected result:
----------------
I should get "true" printed out.

Actual result:
--------------
Using 5.2.0:
Warning: mssql_connect(): Unable to connect to server:  x.x.x.x in
C:\db-test.php on line 3
fubar


Using 5.1.4:
true


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


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

Reply via email to