Jump to content

Recommended Posts

Posted

Is there any way to set up WebSocket servers in PHP without using third-party WebSocket services (i.e. socket.io)?

Posted (edited)

  

And also I need to fix the errors with the WS server. I can't retrieve the headers needed to upgrade the request.

image.thumb.png.d16ab8f44402f1c4449e1826b4e699df.png

 

Check the headers printed:

image.thumb.png.1c65e82cf1b411c1c30066fe8ca5bb58.png

 

 

I've found some errors in the Apache log file:

[Thu Mar 21 15:58:36.854208 2024] [proxy:error] [pid 521884:tid 10728] (20014)Internal error (specific information not available): [client 192.168.0.10:51010] AH01084: pass request body failed to 192.168.0.10:9443 (netmate.com)
[Thu Mar 21 15:58:36.854208 2024] [proxy:error] [pid 521884:tid 10728] [client 192.168.0.10:51010] AH00898: Error during SSL Handshake with remote server returned by /ws/
[Thu Mar 21 15:58:49.946711 2024] [proxy_wstunnel:trace1] [pid 521884:tid 10720] mod_proxy_wstunnel.c(51): [client 192.168.0.10:51169] canonicalising URL //netmate.com:9443
[Thu Mar 21 15:58:49.947709 2024] [proxy_http:debug] [pid 521884:tid 10720] mod_proxy_http.c(1967): [client 192.168.0.10:51169] AH01113: HTTP: declining URL wss://netmate.com:9443/
[Thu Mar 21 15:58:49.947709 2024] [proxy_wstunnel:debug] [pid 521884:tid 10720] mod_proxy_wstunnel.c(321): [client 192.168.0.10:51169] AH02451: serving URL wss://netmate.com:9443/
[Thu Mar 21 15:58:49.947709 2024] [proxy_wstunnel:trace2] [pid 521884:tid 10720] mod_proxy_wstunnel.c(126): [client 192.168.0.10:51169] sending request
[Thu Mar 21 16:08:49.948173 2024] [proxy:error] [pid 521884:tid 10720] (20014)Internal error (specific information not available): [client 192.168.0.10:51169] AH01084: pass request body failed to 192.168.0.10:9443 (netmate.com)
[Thu Mar 21 16:08:49.948173 2024] [proxy:error] [pid 521884:tid 10720] [client 192.168.0.10:51169] AH00898: Error during SSL Handshake with remote server returned by /ws/

 

Edited by sagnik
Posted

@Krydos If I disable apache then how can I connect to the Websocket as a client?

Posted

The server still has nginx running even if apache is turned off. Nginx can support PHP without Apache.

Posted
On 3/26/2024 at 6:36 PM, wolstech said:

The server still has nginx running even if apache is turned off. Nginx can support PHP without Apache.

No, see, I'm currently trying to setup the WS server on my localhost using Apache & PHP on Windows

Posted

You ask for help, and then refuse to do my suggestion. The reason I mentioned it was because someone else recently had the same issue as you with websockets and managed to solve it by turning off Apache. 

If you don't want our help that's fine. Just let us know if you manage to solve it on your own so we can use the information to help other people, and maybe the other people will actually do our suggestions.

  • Krydos changed the title to [Solved] Using custom WebSocket servers with PHP in Johnny/Tommy server
Posted

Also, we are unable to provide assistance for servers that are not ours. As a result, we’re not able to assist with a local development installation of Apache on your computer.

  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...