Hi,
Hope you're all good! I'm having a hard time getting the Webmud (
http://www.phudbase.com/webmud.php) to run - I was hoping you could lend a helping hand.
Here's my setup:
- Google Cloud instance running ubuntu 18.04
- For the sake of debugging - all in/out traffic ALLOWED on firewall
- For the sake of debugging - UFW has been disabled
- LAMP stack installed
- PHP CLI installed
- Code archive unpacked into /var/www/html/phudbase
From the Web Server + PHP point of view, I'm all set - I can see the client by navigating to
http://dum-devclient02.dynu.net/phudbase/wm_client/
Here are the config files amended as per the instructions:
server.php
/* * Standard host and port settings * Keep in mind that on a live host, you'll want to bind to the outbound IP or host name, not localhost or$ */ define("HOST", "35.198.179.222"); define("PORT", "12346"); define("PORT_POLICY", "843"); // Leave this be: may require running ./server.php as root // /* * The following defines are for the WebSocket Handshake, and should be set according to your server. * If you're testing locally (based on the HOST and PORT above), yours should look like the values below. * * If you're deploying the application on a live server, the values would like more like: * RESOURCE: /wm_server/server.php (as in
example.com/wm_server/server.php) * HOST:
example.com:12346 * ORIGIN:
example.com */ define("WS_RESOURCE", "/phudbase/wm_server/server.php"); define("WS_HOST", "
35.198.179.222:12346"); define("WS_ORIGIN", "
http://35.198.179.222");
client.js
// Change this as necessary // var wshost = "ws://
35.198.179.222:12346/phudbase/wm_server/server.php";
The issue is when navigating to the client on
http://dum-devclient02.dynu.net/phudbase/wm_client/ I'm not getting the CONNECTED status, also a message "WebSocket error:" is displayed in the window.Am I missing something really obvious? Should I be running the server via "sudo php -q server.php" as a daemon in the background? I tried running it, but I get the following:
/var/www/html/phudbase/wm_server$ sudo php -q server.php PHP Warning: Use of undefined constant E_WARN - assumed 'E_WARN' (this will throw an Error in a future version of PHP) in /var/www/html/phudbase/wm_server/includes/errorFunctions.inc on line 16 PHP Warning: A non-numeric value encountered in /var/www/html/phudbase/wm_server/includes/errorFunctions.inc on line 16 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Attempting to bind to port 12346... PHP Warning: socket_bind(): unable to bind address [99]: Cannot assign requested address in /var/www/html/phudbase/wm_server/includes/classes/Server/SocketServer.class.inc on line 79 Could not bind...
Any assistance will be much appreciated!
Many thanks,
Bartek