mssql connectivity with php5
- Hi everyone
i am developing website in php5 with database mssql.
i am new with mssql
When i am trying to connect with mssql i am getting this error.
Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'NT
AUTHORITY\ANONYMOUS LOGON'. (severity 14) in C:\wamp\www\nimspl\conn\config.php on line 23
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: VBSERVER\MSSQL in
C:\wamp\www\nimspl\conn\config.php on line 23
Could not connect to SQL Server on VBSERVER\MSSQL Login failed for user 'NT AUTHORITY\ANONYMOUS
LOGON'.
I am using MSSQL server 2005.
Using Microsoft SQL Server Mgt. Studio Express i am able to connect database with Authentication :
SQL Server Authentication
I have enable in php
1. extension=php_mssql.dll in php.ini file.
2. mssql.allow_persistent = On
3. mssql.secure_connection = On
Moreover i have download latest file "ntwdblib.dll" and kept in my php folder.
Now pls guide me for this.
I am stuck in this.
Thanks
- Moved byPhil BrammerMVP, ModeratorFriday, October 09, 2009 12:47 PMMoved to the SQL Server PHP forum (From:SQL Server Integration Services)
Answers
What is the result if you use SQL login like "sa"? From the error message, it looks related to Kerberos authentication failure if you are in a domain. Please refer to the following articles to correct any Kerberos authentication issues at your SQL Server:
How to make sure that you are using Kerberos authentication when you create a remote connection to an instance of SQL Server 2005
http://support.microsoft.com/default.aspx/kb/909801
Kerberos Authentication and SQL Server
http://msdn.microsoft.com/en-us/library/cc280744.aspx
How to use Kerberos authentication in SQL Server
http://support.microsoft.com/kb/319723
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Marked As Answer byCharles Wang - MSFTMSFT, ModeratorTuesday, October 20, 2009 12:01 PM
All Replies
What is the result if you use SQL login like "sa"? From the error message, it looks related to Kerberos authentication failure if you are in a domain. Please refer to the following articles to correct any Kerberos authentication issues at your SQL Server:
How to make sure that you are using Kerberos authentication when you create a remote connection to an instance of SQL Server 2005
http://support.microsoft.com/default.aspx/kb/909801
Kerberos Authentication and SQL Server
http://msdn.microsoft.com/en-us/library/cc280744.aspx
How to use Kerberos authentication in SQL Server
http://support.microsoft.com/kb/319723
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Marked As Answer byCharles Wang - MSFTMSFT, ModeratorTuesday, October 20, 2009 12:01 PM
- have you enabled the i_usr account for login on sql server and the database it is obvious you are trying windows authentication!
- if you are trying sql authentication then please make sure you have enabled mixed authentication. also enabling secure connection in php,ini is for windows authentication turn it off if you are trying to connect sql auth.


