PHP can't connect to localhost XMPP server on port 5222
Posted
by Ben Werdmuller
on Stack Overflow
See other posts from Stack Overflow
or by Ben Werdmuller
Published on 2010-04-05T23:32:27Z
Indexed on
2010/04/05
23:33 UTC
Read the original article
Hit count: 255
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.
However, PHP can't open a stream using stream_socket_client to port 5222. Even at its simplest level:
stream_socket_client("tcp://localhost:5222", $errno, $errstr, 30, STREAM_CLIENT_CONNECT);
Returns a timeout error. However, again, connecting with an IM client to localhost on port 5222 works fine.
Any ideas? I'm stuck!
© Stack Overflow or respective owner