sagnik Posted March 21 Share Posted March 21 Is there any way to set up WebSocket servers in PHP without using third-party WebSocket services (i.e. socket.io)? Link to comment Share on other sites More sharing options...
MoneyBroz Posted March 21 Share Posted March 21 Krydos might know some info about this. Link to comment Share on other sites More sharing options...
sagnik Posted March 21 Author Share Posted March 21 (edited) And also I need to fix the errors with the WS server. I can't retrieve the headers needed to upgrade the request. Check the headers printed: 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 March 21 by sagnik Link to comment Share on other sites More sharing options...
Krydos Posted March 21 Share Posted March 21 Have you tried disabling Apache? Link to comment Share on other sites More sharing options...
sagnik Posted March 26 Author Share Posted March 26 @Krydos If I disable apache then how can I connect to the Websocket as a client? Link to comment Share on other sites More sharing options...
wolstech Posted March 26 Share Posted March 26 The server still has nginx running even if apache is turned off. Nginx can support PHP without Apache. Link to comment Share on other sites More sharing options...
sagnik Posted March 28 Author Share Posted March 28 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 Link to comment Share on other sites More sharing options...
Krydos Posted March 28 Share Posted March 28 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. Link to comment Share on other sites More sharing options...
wolstech Posted March 28 Share Posted March 28 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. Link to comment Share on other sites More sharing options...
Recommended Posts