I am relatively new to the world of PHP and I'm having a bit of difficulty trying to fork a perl process in a php script. The perl process which I need to fork takes a couple of minutes to complete so I want the user to be able to press a button on the web page which executes the perl script then leave that page and have the perl script running in the background as an independent process.
The basic structure of the code I'm writing is:
Code: Select all
//Perform some database queries here to gather required data.
//Call the perl script..Not really sure if this is the correct way to use the system() function??
system('perl D:\dir1\Test.pl', $retval);
//Then fork this perl process using pcntl_fork()
????Thanks in advance,
Denis