简体   繁体   English

将用户重定向到由getLoginURL()提供的URL时,热修复在IE上收到的HTTP错误代码500

[英]Hot to fix HTTP error code 500 received on IE when redirecting user to URL provided by getLoginURL()

So, I have this PHP application that uses FB Connect for authenticating it's users. 因此,我有一个使用FB Connect对其用户进行身份验证的PHP应用程序。 Everything looks right in Chrome and Firefox and as far as I knew it did work before on IE. 据我所知,在Chrome和Firefox上一切正常,而在IE上它确实可以正常工作。

For a couple of days now I cannot make it work in IE anymore, even though I haven't changed anything. 几天以来,即使我没有进行任何更改,我也无法使其在IE中运行。

The idea is simple. 这个想法很简单。 When an users goes to http://myapp.com/login we redirect him (with an header('location:'.$facebook->getLoginURL()); command) to an URL provided by FB PHP SDK, that is getLoginURL() . 当用户访问http://myapp.com/login我们将其重定向(使用header('location:'.$facebook->getLoginURL());命令)到FB PHP SDK提供的URL,即getLoginURL()

Now, as I stated, in Chrome and Firefox it looks and works as intended and the user is presented with FB's login form. 现在,正如我所说,在Chrome和Firefox中,它的外观和工作符合预期,并且向用户显示了FB的登录表单。 But in IE all that we get is a message that says The website cannot display the page and it's HTTP response code is set to 500. 但是在IE中,我们得到的只是一条消息,指出The website cannot display the page并且其HTTP响应代码设置为500。

Any idea what that could be? 任何想法可能是什么?

Later edit 以后编辑

We found out that on some computers it does work on IE as well. 我们发现在某些计算机上它也可以在IE上运行。 So that makes it even more frustrating. 因此,这更加令人沮丧。 What's different between 2 different computers both running IE10 on Windows 8 on the same WiFi network? 在同一WiFi网络上都在Windows 8上运行IE10的两台不同计算机之间有什么区别?

Another update 另一个更新

So we compared the URLs that getLoginURL() returns in Chrome and IE10 and they look like this: 因此,我们比较了getLoginURL()在Chrome和IE10中返回的URL,它们看起来像这样:

IE10 : IE10

https://www.facebook.com/dialog/oauth?client_id=1234567890&redirect_uri=http%3A%2F%2Fdev.puzzled.by%2Flogin%2Fpopup&state=80c85248af70ed5b0a1826e4e1662b79 https://www.facebook.com/dialog/oauth?client_id=1234567890&redirect_uri=http%3A%2F%2Fdev.puzzled.by%2Flogin%2Fpopup&state=80c85248af70ed5b0a1826e4e1662b79

Chrome : 镀铬

https://www.facebook.com/dialog/oauth?client_id=1234567890&redirect_uri=http%3A%2F%2Fdev.puzzled.by%2Flogin%2Fpopup&state=0172ab20d05eeab382cd5a0f4340fedd https://www.facebook.com/dialog/oauth?client_id=1234567890&redirect_uri=http%3A%2F%2Fdev.puzzled.by%2Flogin%2Fpopup&state=0172ab20d05eeab382cd5a0f4340fedd

So they look the same. 所以他们看起来一样。 But IE10 just returns an HTTP 500 error code. 但是IE10只会返回HTTP 500错误代码。

PS: Please keep in mind that the real client_id is different. PS:请记住,真实的client_id是不同的。 We just changed it in this post for security reasons. 出于安全原因,我们刚刚在这篇文章中对其进行了更改。

We've "fixed" this on our side at least... We cannot know if our users are having the same problem and if they have it's kind of sad because we can't help them :) 我们至少已经在我们这方面“解决”了这一问题……我们不知道我们的用户是否遇到了同样的问题,以及他们是否感到难过,因为我们无法帮助他们:)

What we did was to delete all saved cookies from IE and it just worked... Crazy a? 我们要做的是从IE删除所有保存的cookie,它确实起作用了……疯了吗?

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

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