PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 13, 2022

[FIXED] How to use PhpWebSocket successfully?

 April 13, 2022     apache, php, phpwebsocket, websocket     No comments   

Issue

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.

Edit 1:

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.


Solution

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.



Answered By - leggetter
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing