简体   繁体   中英

How to open port with PHP?

Trying to test the Ratchet WS server thing: http://socketo.me/docs/hello-world

I run the php script, but if I try to connect I get:

telnet localhost 24320
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

24320 is the port on which IOServer is set to run. I'm running these commands from the same computer on which the server is running

Tried to connect with javascript too ( ws://mysite.com:24320 ), but fails as well.

Do I have to open that port or what? How can I do it?

允许端口24320上的传入连接:

iptables -I INPUT -p tcp -m tcp --dport 24320 -j ACCEPT

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM