sb2008 0 Newbie Poster


A third party development company is creating a third party application for us in PHP and uses a MYSQL database. The app is an extension of our website which is developed in .NET and uses a MSSQL 2005 database. There are some cases where the two databases require connectivity since a few fields need to relate. We are having issues connecting the two databases on the server and after reading some forums have identified it to be a configuration issue.

I was wondering if anyone could be of any help in solving this issue, or lead us in the right direction (i.e. where to begin, forums, etc.). Here is a description and some questions from our developer:


We are trying to get a PHP application (.php pages running on the webserver which is the same physical machine as the MS SQL server) to connect to the database (MS SQL server).

In order to facilitate this, php.ini was configured in the following manner:
mssql.secure_connection = ON

We ensured that IIS/Windows was setup properly too:
\System32\ and \php both contain ntwdblib.dll ver 2000.80.194.0
enable pipe name protocol [Default was disable]
enable TCP/IP IP1 [Default was disable]

MS SQL Server is set to Windows AND SQL server authentication (Mixed mode).

When the PHP application attempts to connect to the database by using:
mssql_connect('localhost', '<userid>', '<password>')

produces this error message:
Login failed for user 'MAIL\IUSR_<computername>'. (severity 14)

Why doe this occur? Why is this IUSR userid being used? the userid we sent in with PHP was a sql userid that we know works (we use it with .NET, and to connect to the database remotely). Also, why is it using the MAIL domain? In anycase, shouldn't this IUSR userid work? it's a valid windows account, and mixed mode authentication is allowed.


Any assistance would be greatly appreciated!