mssql_connect problems

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to connect to MSSQL server 2000 using IIS 6.0. The only way I've
been able to connect, however, is by disabling anonymous access and setting
mssql.secure_connection = On. If I try to connect with anonymous access
turned on it tells me:
Warning: mssql_connect(): message: Login failed for user 'NAME\IUSR_NAME'.
(severity 14). Why does it automatically try to connect using the IUSR
account when I specify the username and password in the function call?
For obvious reasons I want to users on the intranet to be able to use the
pages, and I also want to be able to change the username / password that
connects to the database. I've been googling around and tried to set PHP up
as an ISAPI but to no avail.
Could anyone kick me in the right direction?


Re: mssql_connect problems

Quoted text here. Click to load it

Might be a dumb question but did you turn on SQL Server authentication?

Re: mssql_connect problems

Quoted text here. Click to load it
Thanks! I solved it by turning this on. Sometimes it's hard to see the
forest for all the trees :-)


Re: mssql_connect problems


On Wed, 21 Jul 2004 15:44:57 +0200, "Håvard Olerud Eriksen"

Quoted text here. Click to load it

Could you provide some code? I'm using it on Linux/Apache with
FreeTDS, but maybe I can still help you.

Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. /

Site Timeline