title: How to setup and run a PHP WebSocket service on a cpanel-based shared hosting platform?
body: <p>I have created a Chat application in Ratchet PHP. It runs fine on local machine using WAMP. I want it to setup on live server. </p>
  
  <p>On my server I have:</p>
  
  <ul>
  <li>PHP Support </li>
  <li>SSH access</li>
  <li>Port 9000, which is opened for OutBound connections.</li>
  <li>Sub-domains</li>
  </ul>
  
  <p>What I don't have:</p>
  
  <ul>
  <li>No port for InBound connections.</li>
  <li>No root access in SSH. Say I cannot see/edit <code>iptables</code></li>
  </ul>
  
  <p>I ran <code>php server.php</code> which gives success message about the server is started and listening at port 9000. But when a HTML page tries to connect it using ws://domain:9000 it runs into error-</p>
  
  <blockquote>
    <p>Firefox can’t establish a connection to the server at
    ws://domain.com:9000/</p>
  </blockquote>
  
  <p>I googled a lot and it appears that what I need is a port for inbound connections. </p>
  
  <p>But according to <a href="https://stackoverflow.com/a/29916806/5131768"><strong>this answer</strong></a>  the thing I need is PHP support for Ratchet to work on shared hostings. Can anyone explains what I really need and Is there any workaround If it's not availble in the list of things I have on my server.</p>