佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1100|回复: 1

PHP -> SQL Server 2005 Windows Authentication 问题

[复制链接]
发表于 9-7-2010 04:08 PM | 显示全部楼层 |阅读模式
请问各位,如果我的 IIS 和 SQL 分别在不同的 Server。
我要怎样用 Windows Authentication 来连接 SQL?

IIS 是 IIS 6.0 + PHP 5.2.9 + Windows Server 2003 R2。
SQL 是 SQL Server 2005 Standard + Windows Server 2003 R2。

翻了翻 MSDN 的 How to: Connect Using Windows Authentication http://msdn.microsoft.com/en-us/library/cc296205%28SQL.90%29.aspx

里面提到:

The following points must be considered when you use Windows Authentication to connect to SQL Server:

  • The credentials under which the Web server's process (or thread) is running must map to a valid SQL Server login in order to establish a connection.

  • If SQL Server and the Web server are on different computers, SQL Server must be configured to enable remote connections.


remote connection 我已经 enable 了,但是却连接不成功,显示:
[Microsoft][SQL Native Client][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

猜想是因为我把 IIS 和 MSSQL 分开放的缘故。。
如果我把 IIS 和 MSSQL 都放在同一台 Server,就没有这个问题,可以连接。。

请问有人遇过同样的问题吗?应该要怎样解决?
回复

使用道具 举报


ADVERTISEMENT

发表于 9-7-2010 04:28 PM | 显示全部楼层
没有用过 Windows Authentication 来 connect database 过。
不过,做莫要酱麻烦,不可以用 SQL Authentication 来 connect 吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 23-11-2025 11:28 PM , Processed in 0.110115 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表