Reply to Call to undefined function: pcntl_fork() in php-cgi 4.3

Your name:

Reply:


Posted by cmarvel on 09/22/05 04:29

All:
I have a script using php-cgi 4.3 module. The script attempts to use
the pcntl_fork() call but gets the error message "call to undefined
function: pcntl_fork()" instead. Anyone know what's going on?
I have Apache 2.0+, Php-cgi 4.3 Mandrake Linux 9.1.
Here is my fork.php script:

#!/usr/bin/php-cgi

<?php

$pid = pcntl_fork();

if ($pid == -1) {
die('could not fork');
} else if ($pid) {
// we are the parent
echo "I am the parent, pid = ". $pid ."\n";
pcntl_wait($status); //Protect against Zombie children
} else {
// we are the child
echo "I am the child, pid = ". $pid ."\n";
}

?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация