I try to use PhpWebSocket but if I don't add the intended port (say 1234) to httpd.conf (Listen 1234
), I get:
No connection could be made because the target machine actively refused it
But if I do add it, I get this error on call to socket_bind
:
Address already in use
It's true for any port (I tried several). I use CentOS 6.
Following Jan Prieser's comment, I removed the Listen 1234
from httpd.conf, and the issue is now:
No connection could be made because the target machine actively refused it
So I guess it can bee SELinux and firewall, but there doesn't seem to be neither of these.
PHPWebSocket hasn't been updated since 2010. If you are looking for a PHP based solution I'd recommend looking at Ratchet which is pretty actively maintained.