PHP Websocket on Webserver

后端 未结 2 1606
感动是毒
感动是毒 2021-01-18 08:04

A few days ago I setup this WebSocket server from http://code.google.com/p/phpwebsocket/

It works excellent on my localhost by using Xampp. Then, I uploaded it to my

相关标签:
2条回答
  • 2021-01-18 08:23

    My bet is that your host is blocking incoming requests to the socket. Your not supposed to run scripts like phpwebsocket within a web service (it is a server itself). This confuses a lot of people since PHP is typically used for scripting webpages, not for coding daemons.

    I say this because you mentioned running the script within Xampp, and referred to your hosting service as 'webspace'.

    If this is the case you will have to upgrade to a virtual server package so that you can run your own services.

    0 讨论(0)
  • 2021-01-18 08:24

    Okay, to bring this to an end.

    I found a solution to use my websockets app and I´ve got an explanation why it did not work on my shared hosting solution.

    I contacted Strato who told me that they don`t allow Websocket on shared hosting. The only way to get a similiar result would be to use AJAX Long Pooling.

    Now I purchased to a Virtual Server and my websocket app works great now.

    Thanks for your support.

    0 讨论(0)
提交回复
热议问题