note 38143 added to function.mssql-connect
| From: | jack at mvps dot removethis dot andthis dot org | Date: | Tue, 09 Dec 2003 21:32:45 +0000 |
| Subject: | note 38143 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61710@lists.php.net to get a copy of this message | ||
I'm running PHP 4.3.3 on IIS on a Windows XP workstation and connecting to SQL Server 2000 on a
remote server.
I found that even though I had "SQL and Windows Authentication" selected, and even if I
was using the "sa" account, I wasn't able to connect to the database and I would
receive the message:
Warning: mssql_connect(): message: Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection. (severity 14) in {filename} on line {line number}
I discovered that NT Authentication was turned on in php.ini:
[MSSQL]
mssql.secure_connection = On
By switching this to Off, the user name and password credentials supplied in the function call work
correctly.
----
Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38143
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38143&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38143&report=yes
Search -- http://master.php.net/manage/user-notes.php