I'm trying to fork a command line run XAMPP php process using pcntl_fork(). When I run the command below:
$pid = pcntl_fork();
if($pid == -1){
file_put_contents('testlog.log',"\r\nFork Test",FILE_APPEND);
return 1; //error
}
else if($pid){
return 0; //success
}
else{
file_put_contents($log, 'Running...', FILE_APPEND);
}
I get:
Fatal error: Call to undefined function pcntl_fork()
Can anyone suggest how to fix this?
*fork()
syscalls. – Gristphp5-pcntl
? – Gristport install php5-pcntl
– Grist