1

I have php5 installed on an ubuntu 10.10 server from which I am trying to connect via mssql_connect() to a SQL Server 2005 database running on a Windows 2003 Server. I am getting an error which I believe is because the SQL Server 2005 instance is using the 'Windows Authentication' login method. The error is:

Warning: mssql_connect(): message: Login failed for user 'lv_admin'. (severity 14) in /var/www/AOI/collectserials.php on line 17

The error log in the SQL Server database shows the following:

Login failed for user 'lv_admin'. [CLIENT: (ip of my php server)] 
Error: 18456, Severity: 14, State: 5.

Where lv_admin is the username logged into the Windows 2003 server so I'm not sure what the problem is...

PHP:

$con = mssql_connect("128.251.xxx.xx", 'lv_admin', '[mypass]');
mssql_select_db("itf", $con);

I need some help solving this issue..

1

1 Answer 1

2

I actually figured out my problem. With Windows Authentication I still need to have the username used in the remote script commands specified in the SQL Server Users location. Once I added lv_admin as an 'SQL Authenticated' user in the Security->Logins section I could get a valid connection to the server but the connection to the database failed. So I went into the 'itf' database->Security->Users and added lv_admin there also specifying the privileges I needed and it worked. Hope this saves someone else tons of time!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.