note 125501 added to intro.pcntl

From: Date: Mon, 09 Nov 2020 08:34:26 +0000
Subject: note 125501 added to intro.pcntl
Groups: php.notes 
Request: Send a blank email to php-notes+get-215831@lists.php.net to get a copy of this message
The disabling of pcntl functions not only affects Apache servers but any non-CLI setup, e.g. nginx with PHP-FPM. You can tell by issuing phpinfo() and looking at "disable_functions" in the Core section of the output. It's also worth noting that this behavior can be quite misleading when you call one of the pcntl functions in a namespaced context. For example you may get: "Call to undefined function some\custom\namespace\pcntl_signal()" when calling pcntl_signal from a method within a namespaced class. Your first instinct may be to add a leading backslash, but that won't solve the problem. You need to check whether the function exists at runtime, unless the code is only ever executed from the CLI. ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.174 (proxied: 213.155.83.52) ---- Manual Page -- http://php.net/manual/en/intro.pcntl.php Edit -- https://master.php.net/note/edit/125501 Del: integrated -- https://master.php.net/note/delete/125501/integrated Del: useless -- https://master.php.net/note/delete/125501/useless Del: bad code -- https://master.php.net/note/delete/125501/bad+code Del: spam -- https://master.php.net/note/delete/125501/spam Del: non-english -- https://master.php.net/note/delete/125501/non-english Del: in docs -- https://master.php.net/note/delete/125501/in+docs Del: other reasons-- https://master.php.net/note/delete/125501 Reject -- https://master.php.net/note/reject/125501 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#215831) next »