Good morning.
Next, I downloaded the following project as an example to create a WebSocket:
Testing on a machine with Linux operating system and Apache server worked correctly on the part where the server was started with the command php server.php
, correctly showing in the Terminal the connections made and the socket with the chat worked correctly except that the connection was soon lost after a few message submissions.
However, when testing on a Windows 8 machine and IIS server, running the php server.php
command was not available for the user to verify which requests to the socket were being performed and the socket did not work when connecting, always returns error unknown even with WebSocket installed and active in IIS settings.
How can I make the project with WebSocket work correctly?
When you click Connect in the client.html
file even after the command to start the PHP file:
WebSocket connection to 'ws: // localhost: 2207 /' failed: Error in connection establishment: net :: ERR_CONNECTION_REFUSED
As I should show in CMD or Terminal:
HowtostayinWindowsCMD: