Skip to content Skip to sidebar Skip to footer

Php Websocket On Webserver

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 webspace on St

Solution 1:

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.

Solution 2:

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.

Post a Comment for "Php Websocket On Webserver"