dongtazu3080 2013-07-13 18:27 采纳率: 100%
浏览 60

当我更改服务器时,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.

  • 写回答

1条回答 默认 最新

  • doujishao8793 2014-06-06 20:35
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示