roguitar Posted August 2, 2020 Author 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.
Krydos Posted August 2, 2020 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")
roguitar Posted August 4, 2020 Author 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.
Krydos Posted August 4, 2020 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now