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

Php+mssql+iis

Hi,

I'm newbie in IIS and MSSQL using php. I got problem connecting to my host and selecting database. Could you please help me how to connect using php.

Mar,

flamer_x86
Newbie Poster
12 posts since Sep 2010
Reputation Points: 10
Solved Threads: 2
 

Hi,

I got problem when mssql_select_db is executed, i can't select db.

Mar

flamer_x86
Newbie Poster
12 posts since Sep 2010
Reputation Points: 10
Solved Threads: 2
 

what error message did you get?
http://us2.php.net/manual/en/function.mssql-get-last-message.php

...
mssql_select_db('dbname') or die('MSSQL error: ' . mssql_get_last_message());
hielo
Veteran Poster
1,124 posts since Dec 2007
Reputation Points: 116
Solved Threads: 244
 

Hi,

Here is what it prompt me...
MSSQL error: The server principal "NT AUTHORITY\IUSR" is not able to access the database "mrbiweb" under the current security context.
Where should i look for this? Thanks

Mar

flamer_x86
Newbie Poster
12 posts since Sep 2010
Reputation Points: 10
Solved Threads: 2
 

I fix it by doing this steps

1. Open SQL Server Management Studio.

2. On the left menu, expand Security then Logins. Check if 'NT AUTHORITY\IUSR' exists. If not then that is the cause of the problem.

3. Right-click on Logins then click New Login...

4. On the General page, click Search...

5. On the next popup window, click Advanced...

6. Then on the following window, click Find Now and find IUSR on the Search Results. Then click OK.

flamer_x86
Newbie Poster
12 posts since Sep 2010
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: