Bug #76899 [Nab]: pcntl_async_signals not available in phpdbg

From: Date: Tue, 18 Sep 2018 12:01:41 +0000
Subject: Bug #76899 [Nab]: pcntl_async_signals not available in phpdbg
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217110@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76899&edit=1 ID: 76899 Updated by: cmb@php.net Reported by: kaplun at protonmail dot com Summary: pcntl_async_signals not available in phpdbg Status: Not a bug Type: Bug Package: phpdbg Operating System: CentOS 7 PHP Version: 7.2.10 Block user comment: N Private report: N New Comment: ext/pcntl declares itself to be a cli only extension[1]. cli only extensions can presently only be enabled for cli, cgi and embed[2], which might have been an oversight. [1] <https://github.com/php/php-src/blob/php-7.3.0RC1/ext/pcntl/config.m4#L27> [2] <https://github.com/php/php-src/blob/php-7.3.0RC1/acinclude.m4#L974-L982> Previous Comments: ------------------------------------------------------------------------ [2018-09-18 11:52:53] requinix@php.net The php.ini you see is actually provided by way of php7.2-common's php.ini-production. We can't do anything for it. https://packages.ubuntu.com/bionic/php7.2-phpdbg https://packages.ubuntu.com/bionic/php7.2-common You could make a bug report for -phpdbg to do something else. Or for -common to document why those functions are disabled, which is almost definitely for security and/or technical reasons. ------------------------------------------------------------------------ [2018-09-18 09:11:10] kaplun at protonmail dot com Note that what I reported was found out on webtatic repo. On Ubuntu 18.04, the functions are explicitly disabled for phpdbg in /etc/php/7.2/phpdbg/php.ini disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, However nowhere it is explained why these are disabled. ------------------------------------------------------------------------ [2018-09-18 09:04:35] kaplun at protonmail dot com Description: ------------ pcntl_async_signals(), although available in the PHP interpreter is not available under phpdbg. Test script: --------------- <?php echo pcntl_async_signals($on=1); echo pcntl_async_signals(); Expected result: ---------------- Running: phpdbg -qrr test.php I expect it to output "1". Actual result: -------------- [Uncaught Error in /tmp/test.php on line 2] Error: Call to undefined function pcntl_async_signals() in /tmp/test.php:2 Stack trace: #0 {main} ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76899&edit=1

« previous php.bugs (#217110) next »