note 107127 added to intro.pcntl

From: Date: Mon, 09 Jan 2012 21:32:04 +0000
Subject: note 107127 added to intro.pcntl
Groups: php.notes 
Request: Send a blank email to php-notes+get-185504@lists.php.net to get a copy of this message
The following statement left me searching for answers for about a day before I finally clued in: "Process Control should not be enabled within a web server environment and unexpected results may happen if any Process Control functions are used within a web server environment." At least for PHP 5.3.8 which I am using, and who knows how far back, it's not a matter of "should not", it's "can not". Even though I have compiled in PCNTL with --enable-pcntl, it turns out that it only compiles in to the CLI version of PHP, not the Apache module. As a result, I spent many hours trying to track down why function_exists('pcntl_fork') was returning false even though it compiled correctly. It turns out it returns true just fine from the CLI, and only returns false for HTTP requests. The same is true of ALL of the pcntl_*() functions. ---- Server IP: 208.69.120.55 Probable Submitter: 173.8.145.37 ---- Manual Page -- http://www.php.net/manual/en/intro.pcntl.php Edit -- https://master.php.net/note/edit/107127 Del: integrated -- https://master.php.net/note/delete/107127/integrated Del: useless -- https://master.php.net/note/delete/107127/useless Del: bad code -- https://master.php.net/note/delete/107127/bad+code Del: spam -- https://master.php.net/note/delete/107127/spam Del: non-english -- https://master.php.net/note/delete/107127/non-english Del: in docs -- https://master.php.net/note/delete/107127/in+docs Del: other reasons-- https://master.php.net/note/delete/107127 Reject -- https://master.php.net/note/reject/107127 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185504) next »