AddanD Posted September 9, 2014 Share Posted September 9, 2014 I bought a script not so long back and I am trying to install it on my Linux hosting cPanel with GoDaddy. I have followed the installation instructions (below) provided by the script author but I am having no luck. 1. Modify server/server.php Line: 282 $master = new ChatBot(“(author's domain)”, 10000); I changed the domain name and port to my own domain name and port 8080 (also tried 10000). 2. Run PHP socket on your server Linux Server (terminal): php -q /path/server/server.php I do this and in PuTTY the server says started. 3. Modify assets/js/engine.js ws://(author's domain):10000/envato/chatloc/server/server.php”; I change the domain name again to my own and then change the path to the server. So, why on earth is my Websocket Status showing as 0 in the console? It keeps saying... (in console) DOMException {message: "Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.", name: "InvalidStateError", code: 11, stack: "Error: Failed to execute 'send' on 'WebSocket': St…(my domain).co.uk/lib/jquery-1.8.2.min.js:1:33875)", INDEX_SIZE_ERR: 1…} ANY HELP WOULD BE HIGHLY APPRECIATED. Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/ Share on other sites More sharing options...
gristoi Posted September 9, 2014 Share Posted September 9, 2014 if you purchased the script you should speak to the person you bought it from. No one here is going to be able to help you without knowing what the script is doing Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490467 Share on other sites More sharing options...
AddanD Posted September 9, 2014 Author Share Posted September 9, 2014 if you purchased the script you should speak to the person you bought it from. No one here is going to be able to help you without knowing what the script is doing http://codecanyon.net/item/chatloc-chat-with-nearby/5640785 is the script and there is a live demo if that is any help? Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490468 Share on other sites More sharing options...
AddanD Posted September 9, 2014 Author Share Posted September 9, 2014 The author of the script is no longer helping anyone. Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490469 Share on other sites More sharing options...
ginerjm Posted September 9, 2014 Share Posted September 9, 2014 You are allowed to install scripts on the cpanel that GoDada provides you? Really? My host doesn't offer that feature - I'm surprised that GD does. Or did you describe what you are doing incorrectly? Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490471 Share on other sites More sharing options...
AddanD Posted September 9, 2014 Author Share Posted September 9, 2014 You are allowed to install scripts on the cpanel that GoDada provides you? Really? My host doesn't offer that feature - I'm surprised that GD does. Or did you describe what you are doing incorrectly? I just uploaded the files? :S Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490472 Share on other sites More sharing options...
kicken Posted September 9, 2014 Share Posted September 9, 2014 Assuming you are talking about Godaddy's shared hosting, as far as I know, godaddy does not allow you to run continuous processes in the background which is what would be required for your server.php file. It may run for a few minutes, but eventually Godaddy will kill the process. Aside from that, they probably have their firewalls setup to disallow incomming connections on other ports so your web clients would not be able to connect to the server anyway as the connection would be blocked. For what you want to do you'll need a dedicated or VPS server most likely. Something where you can control how it is setup and what is allowed to run. Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490475 Share on other sites More sharing options...
ginerjm Posted September 9, 2014 Share Posted September 9, 2014 Ah HaH! You 'just uploaded the files' and you expected them to run on the host-provided cpanel screen? I hate to tell you how far off base you are. Actually - you probably just misspoke and don't know the difference much like people refer to phpadmin as their database. Quote Link to comment https://forums.phpfreaks.com/topic/290945-websocket-status-0-cant-establish-a-connection/#findComment-1490478 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.