note 81298 added to ref.mssql
| From: | Slartibartfast at osu1 dot php dot net | Date: | Thu, 21 Feb 2008 17:19:30 +0000 |
| Subject: | note 81298 added to ref.mssql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136359@lists.php.net to get a copy of this message | ||
Using Apache on a windows machine to connect to a networked SQL Server I was getting the following
error:
Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user
'DomainName\MachineName$'. (severity 14)
This occurred regardless of the username and the password that I passed to mssql_connect()
Apparently the username and password parameters are ignored when connecting to SQL Server with
trusted connections. Instead it attempts to connect using the Web Server username and password
instead. Under windows the default webserver account is the machine name (which is probably not set
up as being a windows user).
This can be solved by configuring Apache to log on as a designated user.
- Open Control Panels
- Double click administrative tools
- Double click services
- Right click on Apache and choose properties
- Under the "Log On" tab choose "This Account" and type in a valid domain user
account & password
- Restart the Apache service
----
Server IP: 69.147.83.197
Probable Submitter: 217.40.151.219
----
Manual Page -- http://www.php.net/manual/en/ref.mssql.php
Edit -- https://master.php.net/note/edit/81298
Del: integrated -- https://master.php.net/note/delete/81298/integrated
Del: useless -- https://master.php.net/note/delete/81298/useless
Del: bad code -- https://master.php.net/note/delete/81298/bad+code
Del: spam -- https://master.php.net/note/delete/81298/spam
Del: non-english -- https://master.php.net/note/delete/81298/non-english
Del: in docs -- https://master.php.net/note/delete/81298/in+docs
Del: other reasons-- https://master.php.net/note/delete/81298
Reject -- https://master.php.net/note/reject/81298
Search -- https://master.php.net/manage/user-notes.php