Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP connection to remote SQL 7 using ODBC

Status
Not open for further replies.

rycamor

Programmer
Jun 3, 1999
1,426
US
Here is the error I am getting:

Code:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'., SQL state 28000 in SQLConnect in E:\ANI TEST\quicklist3.php on line 20

I normally run PHP on Unix, so I am not as familiar with NT ODBC issues.

I have PHP running on IIS/NT4, and have made a System DSN for MSSQL 7 on another NT machine. I also made a system DSN for Access running on the local server. PHP has no trouble connecting to the Access DSN, so I know it has ODBC enabled.

But when I try to connect to the remote SQL 7 DSN, I get the above error every time. I did everything as standardly as possible, when creating the DSN: I chose the Standard security method (specific username and password), and did not enable trusted connections. Every time I create the DSN, I run the verification test, and it returns success. Also, I have no trouble connecting to this DSN with Access.

My PHP connection string is:
Code:
$cnx = odbc_connect("dsn_name","username","password");

Any ideas?

Thanks
 
I think that you PHP Authentication Credential are conflicting with your ODBC authentication Credential it is like you are trying to connect twice either with the same account or the diferent accounts.
I hope that would help you AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top