Variable scope: Passing a pipe between AJAX scripts.
Posted: Fri Jul 09, 2010 2:25 pm
I have a bit of an awkward situation. I want php to monitor the output of a running shell script in real time. For this to work, AJAX is obviously required, or else I would get no output until the entire bash script was finished running (useless since the point of the application is to interact with the script). My problem is that the application needs to be started by a main script, and then accessed by the response script for the AJAX request. Is there any form of variable scope in PHP that will allow me to pass something other than string data from one PHP script to another? If I can't find anything I'll have to resort to using screen outside of PHP in order to keep the process running and then every time I need an update screen will have to connect to the running process, read from it, then disconnect again, and that just seems terribly messy. Can PHP pass pointers between scripts?
-conartist6
-conartist6