Page 1 of 1

pcntl problem

PostPosted: 24. February 2011 23:10
by yugoshi
Hi,

I'm trying to work a little piece of code using pcntl_fork().
Code: Select all
<?php
  $pid = pcntl_fork();
  if ($pid != -1) {
    if ($pid) {
      print "In the parent: child PID is $pid\n";
    } else {
      print "In the child\n";
    }
  } else {
    echo "Fork failed!\n";
  }
?>


Unfortunately, I always get a
Fatal error: Call to undefined function pcntl_fork()
when I try to show my php page.

I checked on my http://localhost/xampp/ -> phpinfo(), '--enable-pcntl' is in the configuration command.
What can I do ?

Btw, I also tried to add the compile files of pcntl (pcntl.so & pcntl.la) into my xampp folder and in my php5 library directory. But I still have the problem.

Cheers !

Re: pcntl problem

PostPosted: 01. June 2011 07:47
by dmerel
Did you ever resolve this? i just came across the same problem