note 78805 deleted from function.pcntl-fork by danbrown
| From: | danbrown@php.net | Date: | Tue, 10 Aug 2010 15:46:13 +0000 |
| Subject: | note 78805 deleted from function.pcntl-fork by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171538@lists.php.net to get a copy of this message | ||
Note Submitter: MagicalTux at kinoko dot fr
----
QUOTE from arnold at helderhosting dot nl:
It is not possible to use the function 'pcntl_fork' when PHP is used as Apache module. You
can only use pcntl_fork in CGI mode or from command-line.
Using this function will result in: 'Fatal error: Call to undefined function:
pcntl_fork()'
==============================================
This is not true. I already had to use pcntl_fork() from PHP running as an Apache module so I know.
By default, pcntl is disabled when php is compiled as an apache module, which is to be expected.
Forking in an apache module is rather complex, and one of the most important things you should
remember is to let your child kill himself with SIGKILL. If you just call exit(), you might end
having duplicate headers.
Forking from an Apache module is NOT RECOMMANDED unless you know what you do and fully understand
how apache works.