RE: [PHP] MSSQL_CONNECT problem



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

Sorry for "top posting", that's how my email client sets up the
reply...

Anyway, I don't know what CLI is....? I see the error on the
web. As for
a DSN, I didn't think I need one connecting this way. That is
why the
uname, password, database is supplied, no? This should be a
"dsn-less"
connection....

Either way - I tried adding a DNS on the web server, that points
to the
SQL database, and that connection works...but the code I'm using
from
the web page still does not....

If I use the code you gave me, this is what I get:

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

Fatal error: Call to undefined function mssql_error() in
D:\Inetpub\wwwroot\cratos\test.php on line 2

Please advise...

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


Relevant Pages

  • Re: Outgoing POP3 email missing/lost/not received
    ... Funny thing is that I have had this ISP for 8 years and it has always been ... It looks like when you last ran CEICW, you set the ISP's mail server to: ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)
  • Re: Cannot connect client to server 2003
    ... you need to reconfigure the IP schema of your SBS ... On the SBS 2003 Server open the Server Management console. ... On the Connection Type page, click Broadband, and then click Next. ... Alternate DNS server, type the IP addresses that are provided by your ISP ...
    (microsoft.public.windows.server.sbs)
  • Re: Outgoing POP3 email missing/lost/not received
    ... ISP's mail server instead of the domain name on the ... SUMMARY OF SETTINGS FOR CONFIGURE E-MAIL AND INTERNET ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)
  • Re: Networking Question - VLANs on SBS 2003 Premium SP1
    ... port on the old router so I now have a segregated WLAN. ... be sure you do not enable any DHCP server in internal network. ... On the Connection Type page, click Broadband, and then click Next. ... On the Network Connection, You must enable and configure the network ...
    (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)