Jump to content

Is it possible to use a chat system here?


roguitar

Recommended Posts

  • Replies 33
  • Created
  • Last Reply

Top Posters In This Topic

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")
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...