By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,509 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,509 IT Pros & Developers. It's quick & easy.

How to connect to a remote database ?

P: n/a
Hello,

First, sorry for my bad English.

Here is my problem:

BoxA: XPpro + Apache + php (using php_mssql.php)+ ADOdb + MS SQL Server
+ My_Prog (using local MS SQL PUBS database)

BoxB: NT4 + Apache + php (using php_mssql.php)+ ADOdb + My_Prog (using
remote BoxA PUBS database)

BoxC: W2K

My_Prog uses:
$serveur = '10.0.0.1'; BoxA's IP address
$admin_nom = 'sa';
$admin_mdp = '';
$base = 'PUBS';

$conn = &ADONewConnection($sgbd);
$conn->debug = true;
$a = $conn->Connect ($serveur,$admin_nom,$admin_mdp,$base);
From BoxC, using IE, connecting to:
- BoxA My_Prog : I access PUBS, that's OK
- BoxB My_prog : "Warning: mssql_connect(): message: Echec de la
connexion de l'utilisateur 'sa'. Raison : Non associé à une connexion
sécurisée SQL Server. (severity 14) in ...\adodb-mssql.inc.php on line
438." (I prefer to report the "French" message)

Anyone knows about ?

Thanks in advance,
Eric

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
EricP <er*********@wanadoo.fr> wrote in message news:<bv**********@news-reader3.wanadoo.fr>...
Hello,

First, sorry for my bad English.

Here is my problem:

BoxA: XPpro + Apache + php (using php_mssql.php)+ ADOdb + MS SQL Server
+ My_Prog (using local MS SQL PUBS database)

BoxB: NT4 + Apache + php (using php_mssql.php)+ ADOdb + My_Prog (using
remote BoxA PUBS database)

BoxC: W2K

My_Prog uses:
$serveur = '10.0.0.1'; BoxA's IP address
$admin_nom = 'sa';
$admin_mdp = '';
$base = 'PUBS';

$conn = &ADONewConnection($sgbd);
$conn->debug = true;
$a = $conn->Connect ($serveur,$admin_nom,$admin_mdp,$base);
From BoxC, using IE, connecting to:
- BoxA My_Prog : I access PUBS, that's OK
- BoxB My_prog : "Warning: mssql_connect(): message: Echec de la
connexion de l'utilisateur 'sa'. Raison : Non associé à une connexion
sécurisée SQL Server. (severity 14) in ...\adodb-mssql.inc.php on line
438." (I prefer to report the "French" message)

Anyone knows about ?

Thanks in advance,
Eric


The error message suggests that MSSQL is configured to accept only
Windows logins. I don't know anything about PHP, but is it possible
that your connection string is somehow being ignored, and PHP is
making a trusted connection instead of using the sa login and
password? If Apache on BoxA is running as a local administrator
account, for example, then by default it would be able to connect
using a trusted connection. But Apache on BoxB connecting to MSSQL on
BoxA would be running under a different account, and so could not
connect.

But that's more or less a guess - if it doesn't help, you may want to
post some extra information. MSSQL version, authentication mode
(Windows or Mixed), service accounts used by Apache etc. You might
also want to use sp_who to verify that when BoxA connects, it is
connecting as sa, and not as some other (perhaps Windows) account.

Simon
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.