当我更改服务器时,Steam作为OpenID停止工作

I did a website which uses Steam as OpenID provider. I firstly hosted it on a shared hosting.

But the traffic grew from 50 users in a day to 1000 in a day. I wasn't expecting that and had to change my host. I took another shared hosting with better performance, etc. to see how it is going to grow. But there's now a problem.

My OpenID login with Steam which worked perfectly on the last host doesn't work anymore. I tried with Google, and it worked. So I don't think my script uses a functionality that isn't enabled on my new host.

So when I put Steam identity, it loads during about 30 seconds and then Chrome returns me an error, ERR_EMPTY_RESPONSE. I tried to activate error_reporting E_ALL, but it does the same.

I am using LightOpenID, and here is the portion of the code incriminated:

    $openid->identity = 'http://steamcommunity.com/openid';
    header('Location: ' . $openid->authUrl());

Actually, it doesn't work whenever I call $openid->authUrl(). Here is the complete code: http://pastebin.com/rChDzECq

How can I resolve this? Thank you in advance.

I also had problems fighting the LightOpenID code in the last couple of hours. I finally made it work and here is what I learned in the process.

  1. Absolutely no HTML output before the header() command. Even the tiniest space prevented the command from redirecting anything.

  2. My server wouldn't allow the use of file_get_contents() and just returned a 404 error from the URL passed to it. You can solve this problem with a custom file_get_contents_curl() command. Here's the one I used myself:

    function file_get_contents_curl($url) {
        $ch = curl_init();
    
        curl_setopt($ch, CURLOPT_HEADER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
    
        $data = curl_exec($ch);
        curl_close($ch);
    
        return $data;
    }
    

I know this is a late answer but I hope it will help someone.