Click here to Skip to main content
15,882,114 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I can't execute php apps because
Call to undefined function pcntl_fork() 

how I fix this problems. I used XAMPP for windows 7.
Problems are
$pid = pcntl_fork();

  if ($pid == -1) {
die("ERROR");
  }
  else if ($pid == 0) {
        head($argv[2]);
     exit(0);
  }
  else {
$pids[] = $pid;
      }
    }


Thanks

What I have tried:

else if ($pid == 0) {
        head($argv[2]);

if ($pid == 0)
head($argv[1]);
     exit(0);
Posted
Updated 4-Jun-19 22:35pm

1 solution

Unfortunately, the pcntl installation page[^] says:
Quote:
Currently, this module will not function on non-Unix platforms (Windows).
 
Share this answer
 
Comments
Kepiting Bula 5-Jun-19 4:39am    
I means a solution in this forum but this like unix and out of windows os, any more suggestion
Thomas Daniels 5-Jun-19 4:41am    
This is all I cound find:

https://stackoverflow.com/questions/2458005/forking-in-php-on-windows
Kepiting Bula 5-Jun-19 4:55am    
This solutions are running windows executable files inside php files, any suggestion
Thomas Daniels 5-Jun-19 4:57am    
The point would be that you simulate a fork by running the same process as the currently running one. But I don't really have experience with it myself.
Kepiting Bula 5-Jun-19 5:01am    
I see, U say this isn't work with windows os and running process is one or same process but the list of code is not same

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900