Rick Taylor wrote:
I'm new to PHP and having issues. We have seperate servers for them.
We can use ODBC to test the connection and it works fine. However, when
we try to run the site we get a message of *** Error: Unable to Connect
to Database. Please Try Again Later. ***
We are using a custom app that we aren't getting a lot of assistance
with. The relevant lines in the app are:
define("DBHOST", "//database server name");
define("DBUSER", "user");
define("DBPASS", "password");
if(!$dbCon=mssql_connect(DBHOST,DBUSER,DBPASS)) $error = "Unable to
Connect to Database. Please Try Again Later.";
Can anyone assist a noob php user?
thanks
Thanks for removing any extraneous/irrelevant code. Nice, well-laid-out
question.
The obvious follow-up-question presents itself, so forgive me for asking
if I'm underestimating, but you didn't mention whether or not you were
quoting it verbatim, or whether you had replaced your database host,
userid, and password from the code before you pasted it here.
Just in case it's the really obvious problem, you should be aware that
you are expected to fill in those lines as relevant to your MSSQL server.
For example, if the MSSQL serer was living on a server called
"TORFOX001" (or "//TORFOX001" in the MS local-network naming format),
and you'd set it up with a userid "zippy" with password "pinh34d", those
lines should be modified to read:
define("DBHOST", "//TORFOX001");
define("DBUSER", "zippy");
define("DBPASS", "pinh34d");
-P
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php