roguitar Posted August 2, 2020 Author Share Posted August 2, 2020 Well, first of all you're username is 'roguitar' not 'username' so that part of your script isn't going to work until you enter your username like the comments say.I've tried this, but I couldn't get anything yet. Quote Link to comment Share on other sites More sharing options...
Krydos Posted August 2, 2020 Share Posted August 2, 2020 subprocess.Popen("/home/roguitar/public_html/chat/server/websocket_server.php")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") Quote Link to comment Share on other sites More sharing options...
roguitar Posted August 4, 2020 Author Share Posted August 4, 2020 subprocess.Popen("/home/roguitar/public_html/chat/server/websocket_server.php")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. Quote Link to comment Share on other sites More sharing options...
Krydos Posted August 4, 2020 Share Posted August 4, 2020 I did a little more research and it turns out to start a php script with popen you need to set shell=True, but that isn't required with python scripts. I've never started a php script using cgi like this so I didn't know that off the top of my head. I edited your start.py and tested it and now it works. The other issue I found was your stop.py script has to search for ea-php72 instead of websocket_server.php because php is the executable and the script is an argument passed to the executable. Once again I made the change to your script and tested it and it's working. I don't know how to test your socket though. I left the script not running, so open the start script in your browser, and then test out the socket to see if it's working. Let us know if you need any additional assistance. Quote Link to comment 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.