I am trying to execute perl script inside php script. Although it is running but only for short duration. How to increase the time-limit so that the execution of perl script is finished until the final php script is called of ?
I am running php script on the localhost.
Here is the code :
<?php
$maxChildren = 1;
$pids = array();
$pid = pcntl_fork();
if ($pid) { // Parent
if ($pid < 0) {
// Unable to fork process, handle error here
continue;
} else {
$pids[$pid] = $pid;
}
} else {
exec("perl -f script.pl ");
exit(0);
}
while(pcntl_waitpid(0, $status) != -1);
?>