简体   繁体   中英

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. Everything looks right in Chrome and Firefox and as far as I knew it did work before on IE.

For a couple of days now I cannot make it work in IE anymore, even though I haven't changed anything.

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() .

Now, as I stated, in Chrome and Firefox it looks and works as intended and the user is presented with FB's login form. 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.

Any idea what that could be?

Later edit

We found out that on some computers it does work on IE as well. 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?

Another update

So we compared the URLs that getLoginURL() returns in Chrome and IE10 and they look like this:

IE10 :

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

So they look the same. But IE10 just returns an HTTP 500 error code.

PS: Please keep in mind that the real client_id is different. 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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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