Jump to content

roguitar

Members
  • Posts

    99
  • Joined

  • Last visited

Everything posted by roguitar

  1. Ok, thank you very much. And yes, the other two accounts I'd mentioned doesn't exist, because I as far as I can remember I told you to delete them so that I can have only one. Now I can access the website and server. Anyways, when I try to login to the cpanel, I have something like 'We are in the process of upgrading our servers to use the Plesk control panel...'.
  2. Hello, guys. I can't really remember if this website is linked to one of the following users: munny, roguitar or orange77. The truth is that I want to reactivate sitesfy.tk. Is it possible? I think it has been suspended for inactivity. Thanks
  3. The next issue I see is that file isn't executable on its own. You need to make it like you did in the cron subprocess.Popen("/usr/local/bin/ea-php72 /home/roguitar/public_html/chat/server/websocket_server.php") I've tried this, too and nothing has happened.
  4. I've tried this, but I couldn't get anything yet.
  5. Like this? To start: #!/usr/bin/python3.6 import os, subprocess, signal print("Content-Type: text/html\n\n") counter = 0 p = subprocess.Popen(['ps', '-u', 'username'], stdout=subprocess.PIPE) # must match your username --------^^^^^^^^ out, err = p.communicate() for line in out.splitlines(): if 'websocket_server.php'.encode('utf-8') in line: # ^^^^^^^^^^^----- this has to match the filename of your bot script counter += 1 print("Bot already running.") if counter == 0: subprocess.Popen("/home/roguitar/public_html/chat/server/websocket_server.php") # ^^^^^^^^-- be sure to update it to your username print("Bot started!")To stop: #!/usr/bin/python3.6 import os, subprocess, signal print("Content-Type: text/html\n\n") counter = 0 p = subprocess.Popen(['ps', '-u', 'username'], stdout=subprocess.PIPE) # must match your username --------^^^^^^^^ out, err = p.communicate() for line in out.splitlines(): if 'websocket_server.php'.encode('utf-8') in line: # ^^^^^^^--- this has to match the filename of your loop counter += 1 pid = int(line.split(None, 1)[0]) print("Stopping bot.") os.kill(pid, signal.SIGTERM) if counter == 0: print("Already stopped.")Please, correct me if I am wrong... I've tried the code above and the page is blank. And I believe nothing is running.
  6. Like this? To start: #!/usr/bin/python3.6 import os, subprocess, signal print("Content-Type: text/html\n\n") counter = 0 p = subprocess.Popen(['ps', '-u', 'username'], stdout=subprocess.PIPE) # must match your username --------^^^^^^^^ out, err = p.communicate() for line in out.splitlines(): if 'websocket_server.php'.encode('utf-8') in line: # ^^^^^^^^^^^----- this has to match the filename of your bot script counter += 1 print("Bot already running.") if counter == 0: subprocess.Popen("/home/roguitar/public_html/chat/server/websocket_server.php") # ^^^^^^^^-- be sure to update it to your username print("Bot started!")To stop: #!/usr/bin/python3.6 import os, subprocess, signal print("Content-Type: text/html\n\n") counter = 0 p = subprocess.Popen(['ps', '-u', 'username'], stdout=subprocess.PIPE) # must match your username --------^^^^^^^^ out, err = p.communicate() for line in out.splitlines(): if 'websocket_server.php'.encode('utf-8') in line: # ^^^^^^^--- this has to match the filename of your loop counter += 1 pid = int(line.split(None, 1)[0]) print("Stopping bot.") os.kill(pid, signal.SIGTERM) if counter == 0: print("Already stopped.")Please, correct me if I am wrong...
  7. Maybe the cgi method is a bit difficult to me, cuz I don't have any experience.
  8. I think there's no exit condition. It runs forever unless I close the terminal. At least I guess so... Not sure... And ok, I'll try it for tomorrow. What do you have to say about it?
  9. I think there's no exit condition. It runs forever unless I close the terminal. At least I guess so... Not sure... And ok, I'll try it for tomorrow.
  10. No, nothing, nada... It's the same thing: Service UnavailableThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request. Unless I give you access to check the files in /home/roguiar/public_html/chat/ folder
  11. Yes, I deleted it because I'm afraid of causing problems to myself. Anyway, my plan was to delete it and in the following day (today) set it all again. But I also could set it once and let it run once per day. I'll set it now at 1:15 p.m. Okay, so RewriteEngine On only once, right? I'll then delete the other .htaccess that controls the http/https thing, ok? I think that inside the folder chat/ there must be some file or script where I need to set the port. I don't know what to do, I was thinking of sending my folder to you for you to analyze all the scripts, but I know that you wouldn't do it, and in case you would, you'd certainly charge something for it. So... I'm afraid to ask this. Besides that, the problem persists: Service UnavailableThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
  12. Yes, I deleted it because I'm afraid of causing problems to myself. Anyway, my plan was to delete it and in the following day (today) set it all again. But I also could set it once and let it run once per day. I'll set it now at 1:15 p.m. Okay, so RewriteEngine On only once, right? I'll then delete the other .htaccess that controls the http/https thing, ok? I think that inside the folder chat/ there must be some file or script where I need to set the port. I don't know what to do, I was thinking of sending my folder to you for you to analyze all the scripts, but I know that you wouldn't do it, and in case you would, you'd certainly charge something for it. So... I'm afraid to ask this.
  13. See how there is no / at the front? Without that leading / it tries to look for a directory called home in it's present working directory. To be an absolute path it needs the / at the start. Yes, you're totally right. I did it, and no error was sent to my email related to this cron job there. But... Anyway... I tried to use the chat system there and it's not working yet... I set the port as 4000, I did that all and nothing. I tried to run the path in the browser https://olimppius.heliohost.org/chat/server/websocket_server.php and this message has shown: Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request. What have I done wrong once more? I set the cron job to run at 1:15 p.m. today. I used this command here: /usr/local/bin/ea-php72 /home/roguitar/public_html/chat/server/websocket_server.phpAnd I created an .htaccess in /home/roguitar/public_html/.htaccess and inside it we have: RewriteEngine on RewriteRule ^chat/server/(.*)$ http://127.0.0.1:4000/$1 [P,QSA,L] #RewriteEngine on #RewriteCond %{SERVER_PORT} =80 #RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L] #RewriteEngine On #RewriteRule ^websocket_server.php/(.*)$ ws://ricky.heliohost.org:80/?$1 [P,QSA,L]Remember that there is also another .htaccess in /home/roguitar/.htaccess and there is: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]And I don't know if it's making things awkward.
  14. Ok, I did what you suggested, but now I have the following error: Warning: require_once(home/roguitar/public_html/chat/vendor/autoload.php): failed to open stream: No such file or directory in /home/roguitar/public_html/chat/server/websocket_server.php on line 10 Fatal error: require_once(): Failed opening required 'home/roguitar/public_html/chat/vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/roguitar/public_html/chat/server/websocket_server.php on line 10
  15. Ok, I tried to set the cron job and after that I went to the page https://olimppius.heliohost.org/chat/server/websocket_server.php and this was the message I've got: Service UnavailableThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request. What have I done wrong? I set the cron job to run at 13:40 today, according to this time here https://www.google.com/search?q=what+time+is+it+utc because I'm here in Brazil, and at this exact moment, it's 11:02. So, I believe that the server is already initiated, and if I want to stop it, I just create another cron job and set killall -u roguitar , right? . I think this is all due to this problem pointed in the message shown I put above. I think it's all because of this, lol: Warning: require_once(../vendor/autoload.php): failed to open stream: No such file or directory in /home/roguitar/public_html/chat/server/websocket_server.php on line 9 Fatal error: require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/roguitar/public_html/chat/server/websocket_server.php on line 9
  16. Ok, I tried to set the cron job and after that I went to the page https://olimppius.heliohost.org/chat/server/websocket_server.php and this was the message I've got: Service UnavailableThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request. What have I done wrong? I set the cron job to run at 13:40 today, according to this time here https://www.google.com/search?q=what+time+is+it+utc because I'm here in Brazil, and at this exact moment, it's 11:02. So, I believe that the server is already initiated, and if I want to stop it, I just create another cron job and set killall -u roguitar , right? . I think this is all due to this problem pointed in the message shown I put above.
  17. Ok, just have a look at what I've done: in /home/roguitar/public_html/chat/vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php I set the port as 4000 and the address as 0.0.0.0. in line 67. And in /home/roguitar/public_html/chat/server/websocket_server.php I set the port as 4000 too in line 58. And in /home/roguitar/public_html I created a .htaccess with those lines of code you gave me, but I adapted it more or less like this: RewriteEngine on RewriteRule ^chat/server/(.*)$ http://127.0.0.1:4000/$1 [P,QSA,L]This is because the script of the server is in chat/server/websocket_server.php. But okay... In /home/roguitar/public_html/view.php I set this line (435) here in JS: var websocket_server = new WebSocket("ws://ricky.heliohost.org:4000/"); /* ws://localhost:8080/ AND ports 80/443 */Now, what code do I have to type in this cron or cgi thing there? How do I do this? I'm a total newbie at it.
  18. Or like this? RewriteEngine onRewriteCond %{SERVER_PORT} =80RewriteRule ^(.*) https://olimppius.heliohost.org/chat/server/websocket_server.php [R,L]
  19. Like this? RewriteEngine On RewriteRule ^websocket_server.php/(.*)$ ws://ricky.heliohost.org:80/?$1 [P,QSA,L]
  20. Right! And what exactly do I write inside this .htaccess?
  21. Unfortunately, it needs to open a port...
  22. Hi, there. I'd like to know if it's possible to use a chat system here (PHP, JS, Websocket). I have a chat system made in php and integrated with a socket by using JS, and in localhost, everytime I want to use it, I have to start the server first using the command below in terminal: php.exe websocket_server.php Is there any way of doing this here? If so, what are the procedures? How do I do this here? Thank you!
  23. Now I'm trying the connection through FileZilla. It was only one try and I got blocked?
  24. Thank you so much. Why is that the case? I tried the SFTP connection, port 1373. Is that correct? And the FTP one, but port 21 or 22. Is that so? My username (munny) and password are correct, though. It is still blocked, sir...
×
×
  • Create New...