简体   繁体   English

Microsoft PHP SQL Server连接问题-如何解决被阻止的问题

[英]Microsoft PHP SQL Server Connection Issues - How To Troubleshoot What Is Being Blocked

I am connecting through Windows Authentication. 我正在通过Windows身份验证进行连接。 I have two webservers on local system. 我在本地系统上有两个Web服务器。 IIS 6.0 on port 80, Apache 80:80; IIS 6.0端口80,Apache 80:80; I have created a DSN and connected. 我已经创建了一个DSN并已连接。 I have written simple ASP/VBS Script and connected with this DSN. 我已经编写了简单的ASP / VBS脚本并与此DSN连接。

I've tried to use this DSN using odbc_connect in PHP and it failed. 我尝试在PHP中使用odbc_connect使用此DSN,但失败了。 I then tried the connection as outlined here: 然后,我尝试按如下所示进行连接:

http://msdn.microsoft.com/en-us/library/cc296161%28SQL.90%29.aspx http://msdn.microsoft.com/zh-cn/library/cc296161%28SQL.90%29.aspx

I then created a local dsn using ODBC and verified the code actually works from localhost running on Apache. 然后,我使用ODBC创建了本地dsn,并验证了该代码实际上可从Apache上运行的localhost运行。

My IT guys won't/can't create a user id/password on SQL Server. 我的IT人员不会/不能在SQL Server上创建用户ID /密码。 The issue is if I bring this up, they play a game of 'what's wrong.' 问题是,如果我提起这个问题,他们会玩“怎么了”游戏。 I can deduce what is wrong ( lack of trusted authentication ); 我可以推断出什么地方出了问题(缺少可信的身份验证); however, I can't rule other issues since I can't look at this server side. 但是,由于无法查看此服务器端,因此无法排除其他问题。

I'm thinking I'm connecting with a DSN, but it's not using the same credentials as my windows account from my web browser. 我以为我正在连接DSN,但它没有使用与我的Web浏览器中Windows帐户相同的凭据。 I attempted to run Fiddler to run this down and I'm not seeing anything jump out there. 我试图运行Fiddler来解决这个问题,但是我没有看到任何东西跳出来。

I'm sure this is an 'authentication' issue or something be blocked. 我确定这是一个“身份验证”问题或某些被阻止。 I just trying to see if there is something else I've missed or what could be blocked before I go play Twilight zone with the IT dept ( or the nasty old gnomes at the bridge in Dora's world...lol). 我只是想看看是否还有其他我想念的东西,或者在我与IT部门一起玩《暮光之城》之前可能被阻止的东西(或者在Dora的世界桥上讨厌的老侏儒……大声笑)。

I have bad news for you: Windows Authentication stinks big time. 我有一个坏消息:Windows身份验证浪费了很多时间。 The exact problem is called ' double hop authentication ' - google for it and you'll find lots of people asking for help. 确切的问题称为“ 双跳身份验证 ”-用google搜索,您会发现很多人在寻求帮助。 Half of them would have solved the problem using something that already failed to work for you - while the other half apparently never solved the issue. 他们中的一半会使用对您来说不起作用的方法来解决问题-而另一半显然从未解决过该问题。

I wrote recently an extranet sensitive data gathering application for a customer that insisted everything being based on Active Directory and Windows Authentication. 我最近为客户编写了一个Extranet敏感数据收集应用程序,该应用程序坚持所有内容都基于Active Directory和Windows身份验证。 To cut a long story short, the whole project stopped for a whole month until they gave up and allowed a single SQL Server login for the network connection. 简而言之,整个项目停止了一个月,直到他们放弃并允许一次SQL Server登录以进行网络连接。 Nothing else worked. 没有其他工作。

Lessons learned: 得到教训:

  • don't believe M$ sales brochures where they say it ' just works ' and ' perfectly integrated ' 不要相信M $销售手册说他们“ 行之有效 ”和“ 完美融合
  • a ten minute job of connecting a server to a DB can become a month long showstopper if you disregard the point above 如果您忽略以上几点,则将服务器连接到数据库的十分钟工作可能会变成一个月的大忙。
  • next customer that comes up with AD and the like can expect to pay dearly for the privilege of forcing me to work with Microsoft's stuff again... 拥有AD等功能的下一个客户可以期望为强迫我再次使用Microsoft的东西而付出昂贵的代价...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM