views:

15

answers:

1

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);
$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

A: 

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.

Kevin Schroeder