Sending Messages to server with Pawl
I am running a websocket server with Ratchet. The problem is when I have the server execute shell scripts based on incoming messages, I need there to be a way to let the server know that the script is finished executing. My solution was for the shell scripts to call a php script that sets up a client using pawl(https://github.com/ratchetphp/Pawl), and then sends a message to the server informing it of the completed task. Whenever I do this, the server hangs, and needs to be restarted. When I call php script directly from the command line, a socket is created, and a message is sent, but when the server calls the same script with "exec" or through executing a sh script which then calls the php script, the server hangs, produces no errors, and needs a restart. I imagine it has something to do with the client trying to connect to itself because when I use an invalid ip, it produces an error, but when I use the actual ip, it hangs. Please help.