Closed sfa1906 closed 8 years ago
Unless you get an admin (root) to give your script the needed authorization, it certainly won't be able to bind the port. Even if that was the case, troubleshooting this kind of issue would require access to the firewall logs and settings.
A VPS could be a solution but do make sure that they give you NAT support and sufficient resources to get it working.
Websockets will absolutely never work on shared hosting.
You need a plan that gives you shell access and lets you bind to ports.
I am trying to run it on a live server with joomla portal installed. I saved the files in the public_html folder. The server starts properly but doesnt respond to the requests. The chrome console says "ERR_CONNECTION_TIMED_OUT". I am accessing the client from the live server itself.
In client.html I am keeping:
var host = "ws://xyz.com:9006/echobot"; // SET THIS TO YOUR SERVER
and in testwebsock.php:
$echo = new echoServer("0.0.0.0","9006");
I tried keeping IP address and domain name in both the client as well as php file but with same result.
Can some one please help me?
Also I am using a shared space hosting so I dont have the firewall controls. Do I need a virtual private server for websockets?