开发者

Why does my server hang when I call a page over files_get_content?

I am trying to get content from a wordpress installation on a subdomain of my server. I tried that with file_get_content and also with Zend_Http_Client.

$client = new Zend_Http_Client(Zend_Registry::get('CONFIG')->static->$name->$lang);
开发者_StackOverflow中文版$content = $client->request()->getBody();

As long as I run in on my localhost, it works fine. As soon as it runs on the same server as the subdomain, it hangs forever (timeout).

Specs:

  • Zend Framework Application trying to get HTML from a Wordpress Page
  • Server running on lighttpd
  • Several cores, much ram

Do you guys have an idea on how this problem can be resolved? Cheerio


One of the things you can also use is tcpdump to follow the network packets. That might give you an idea of if the problem is occurring in PHP, on the network or on the server side of the equation. You can take the output of tcpdump, write it to a file, and then load it up using something like Wireshark to inspect the packets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜