954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

php mssql connectivity error

Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (severity 14) in \usr\local\htdocs\connect.php on line 5

We are using the following code for connectivity

mssql_connect('servername,port', 'username', 'password');
mssql_select_db("dbname");

yogi_xevoke
Newbie Poster
1 post since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

You ARE changing those values to the proper ones, right? For example, to use the username "daniweb" and password "isthecurrentsite" and connect to the server www.example.com , your connection string would be:
mssql_connect('localhost', 'daniweb', 'isthecurrentsite');

Puckdropper
Posting Pro
500 posts since Jul 2004
Reputation Points: 23
Solved Threads: 23
 

I was facing the same type of error like [Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'CORP\sanjsahu'. (severity 14) in D:\Program Files\xampp\htdocs\ on line 23
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: DTPXP-SANJSAHU\SQLEXPRESS in D:\Program Files\xampp\htdocs on line 23
Couldn’t connect to SQL Server on DTPXP-SANJSAHU\SQLEXPRESS]
while connecting through mssql.But some time it's working with the same user name and password and on the other time it throughs an exception like the abobe statement as described. Please let me know any permanent solution for that.

sanjayks
Newbie Poster
1 post since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You