title: PHP can't connect to localhost XMPP server on port 5222
body: <p>I've set up an ejabberd install locally on my Windows box, where I also have Apache, PHP and MySQL. I've also confirmed that it works great using Digsby, and have kicked the tires a bit by creating some users, sending some messages, etc. All good.</p>
  
  <p>However, PHP can't open a stream using stream_socket_client to port 5222. Even at its simplest level:</p>
  
  <pre><code>stream_socket_client("tcp://localhost:5222", $errno, $errstr, 30, STREAM_CLIENT_CONNECT);
  </code></pre>
  
  <p>Returns a timeout error. However, again, connecting with an IM client to localhost on port 5222 works fine. (Using stream_socket_client to open a simple connection to localhost on port 80 also works.)</p>
  
  <p>Any ideas? I'm stuck!</p>