WEBSOCKETS with PHP in recent WINDOWS enviroment (IIS 10)RSS

1 reply

Last post Aug 29, 2019 07:06 AM by rasega

  • WEBSOCKETS with PHP in recent WINDOWS enviroment (IIS 10)

    Jul 23, 2019 12:04 PM|rasega|LINK

    I'm trying to upgrade an intranet chat/messages system I've realized with ratchet [enter link description here][1] written in PHP that works fine with websockets.


    The issue is that it has to be launched by CLI and always having a "non performing" DOS window live on the server

    Now that we upgraded the system to a more recent windows server version (2016) we see there is now support for websockets protocol directly by Windows Server 2016 and IIS 10.

    I've already installed and enabled the protocol in windows but there should be something more to setup or to tune to make it work.

    I've set 2 sites in IIS, one to port 80, the second one just for websockets bind to port 8080.

    Now calling like this:

    websocket = new WebSocket('ws://localhost:8080');

    it answer like:

    WebSocket connection to 'ws://localhost:8080/' failed: Error during WebSocket handshake: Unexpected response code: 200

    By digging the web I've read that the correct response code should be 101, but how to obtain it ?

  • Re: WEBSOCKETS with PHP in recent WINDOWS enviroment (IIS 10)

    Aug 29, 2019 07:06 AM|rasega|LINK

    Anybody has suggestions about this ?