Re: [PHP] MSSQL_CONNECT problem
- From: mrsquash2@xxxxxxxxx ("Dan Shirah")
- Date: Wed, 10 Dec 2008 08:09:49 -0500
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');
- Follow-Ups:
- RE: [PHP] MSSQL_CONNECT problem
- From: "David Stoltz"
- RE: [PHP] MSSQL_CONNECT problem
- References:
- MSSQL_CONNECT problem
- From: "David Stoltz"
- Re: [PHP] MSSQL_CONNECT problem
- From: "Dan Shirah"
- Re: [PHP] MSSQL_CONNECT problem
- From: "Bastien Koert"
- RE: [PHP] MSSQL_CONNECT problem
- From: "David Stoltz"
- Re: [PHP] MSSQL_CONNECT problem
- From: "Daniel Brown"
- RE: [PHP] MSSQL_CONNECT problem
- From: "David Stoltz"
- MSSQL_CONNECT problem
- Prev by Date: RE: [PHP] MSSQL_CONNECT problem
- Next by Date: RE: [PHP] MSSQL_CONNECT problem
- Previous by thread: RE: [PHP] MSSQL_CONNECT problem
- Next by thread: RE: [PHP] MSSQL_CONNECT problem
- Index(es):
Relevant Pages
|