RE: [PHP] MSSQL_CONNECT problem



-----Original Message-----
From: Dan Shirah [mailto:mrsquash2@xxxxxxxxx]
Sent: Wednesday, December 10, 2008 8:46 AM
To: David Stoltz
Cc: Daniel Brown; Bastien Koert; php-general@xxxxxxxxxxxxx
Subject: Re: [PHP] MSSQL_CONNECT problem


Try something like this:



$dbhost=\\\\SERVER\\INSTANCE_NAME,PORT;
$dbuser="USERNAME";
$dbpass="PASSWORD";
$db_connect=mssql_connect($dbhost,$dbuser,$dbpass) or die ('Server
connection failed');



$mssql_database = mssql_select_db("DATABASE", $db_connect) or die ('DB
selection failed');



Same thing:



Warning: mssql_connect() [function.mssql-connect]: Unable to connect
to
server: \\10.10.103.222\INTRA_SQL,1433 in
D:\Inetpub\wwwroot\cratos\test.php on line 5

Server connection failed

Is INTRA_SQL your instance name or database name? If it is the instance
name, is that instance setup to use 1433 as the port? I know 1433 is
the
default port for MSSQL, but the majority of people change that.


Correct - intra_sql is the instance, yes, it's using default port 1433
(which is also specified in the php.ini file)....I've tried connecting
with and without specifying the port - but both ways don't work....

.



Relevant Pages

  • Re: Correction
    ... Normally to physically disconnect is just a matter of reaching for the ... >> I have an ADSL connection which polls my computer from time to time, ... > disallow each and every port with Windows Firewall? ...
    (microsoft.public.windowsxp.messenger)
  • Re: Using Remote Desktop From an SBS Domain
    ... when you tried to RDP while attached directly to a port on your router? ... Internet to initiate an IP conversation with your computer. ... This situation is different than if you ran your own NAT connection sharing ...
    (microsoft.public.windows.server.sbs)
  • Re: Still cant connect to RWW or OWA remotely
    ... it certainly appears to be something about the SBS configuration. ... Meridian.local Ethernet adapter Local Area Connection: ... Windows SMALL BUSINESS SERVER 2003 Windows IP Configuration ... 192.168.254.254) directly to a port on the router and then ...
    (microsoft.public.windows.server.sbs)
  • Re: Still cant connect to RWW or OWA remotely
    ... it certainly appears to be something about the SBS configuration. ... Meridian.local Ethernet adapter Local Area Connection: ... Windows SMALL BUSINESS SERVER 2003 Windows IP Configuration ... 192.168.254.254) directly to a port on the router and then ...
    (microsoft.public.windows.server.sbs)
  • Re: Random unprivileged TCP ports below 5000 kind-of open for a fraction of a second
    ... When Nmap (or many ... > other applications, such as Telnet) does a connectcall, the OS is ... > supposed to choose a good souce port to bind to for the connection. ... I saw a familiar "Connection reset by peer" every time the random port ...
    (Incidents)

Loading