Home  |  Linux  | Mysql  | PHP  | XML
From:Rick Taylor Date:Fri Apr 25 04:26:36 2008
Subject:Re: php and mssql on seperate servers
Thanks for the help everyone.   It is now fixed.  They guy that originally 
set it up used the //servername.  I removed the // and it works fine, until 
it got to the next error.   :)

This is going to take a while.  I'm sure I'll be back with more questions.


"Peter Westergaard" <peter@westergaard.ca> wrote in message 
news:EF.97.30653.277D0184@pb1.pair.com...
> 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 

Navigate in group php.db at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants