Im a little confused although i am in new territory so if i have got something blatentley wrong im soz but any help would be appreciated.
I have a shell script that i am able to run fine on the linux command line but i effectively want to run this script after the user submits a form and i want it to run in the background.
I thought as a stepping stone what i would do would be to put the required execution of script in a php file on it's own just to get a feel for how to do things but i have come up with some problems.
The php script i am running is ::
Code: Select all
$handle = pclose(popen('./AWR-analyze.sh upload/StevesCompany72ede6f3c97cc8850e5726bea8b49d83/aw*.txt > upload/StevesCompany72ede6f3c97cc8850e5726bea8b49d83/StevesCompany.csv', 'r'))
It actually works but "done" is not rendered until the script has executed.
Now i get really confused.
Although the script executes fine... ( it collates information from txt files to a csv ) .. It should also output the progress and results. ( which it does ono the command line ) If i run this on the command line there are status messages show as the files are processed and then a "completed successfully" comment.
Firstly, i want the script to run aside of the page processing. I think it's called running as a child.... but i also need to dump the results somewhere so that i can pick them up with another script.
As said. Im not entirely sure im completely on track so any help would be really be welcome.