pcntl

Asked by zhixin

how do i install php7.0-pcntl ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu php7.0 Edit question
Assignee:
No assignee Edit question
Solved by:
zhixin
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

lsb_release -a; uname -a

Thanks

Revision history for this message
zhixin (phalcon-8) said :
#2

I in the allocation of a PHP docker image, based on ubuntu 16.04.

through

      apt-get install php7.0

PHP could not use PCNTL extensions, and there is no php7.0 - PCNTL extension.

view the PHP official document, need to recompile PHP.

Have a better way of installation?

Revision history for this message
zhixin (phalcon-8) said :
#3

Have submitted

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

According to https://stackoverflow.com/questions/40408152/how-to-enable-pcntl-on-ubuntu-server-16-04 it is enabled in the Ubuntu php packages.

What output do you receive for the commands

uname -a
lsb_release -crid
php -i | grep pcntl
apt-cache policy php7.0

Revision history for this message
zhixin (phalcon-8) said :
#5

root@86ff9fde8472:~/php# uname -a
Linux 86ff9fde8472 4.9.49-moby #1 SMP Wed Sep 27 00:36:29 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

root@86ff9fde8472:~/php# php -i | grep pcntl
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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, => 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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
pcntl
pcntl support => enabled

root@86ff9fde8472:~/php# apt-cache policy php7.0
php7.0:
  Installed: 7.0.22-0ubuntu0.16.04.1
  Candidate: 7.0.22-0ubuntu0.16.04.1
  Version table:
 *** 7.0.22-0ubuntu0.16.04.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     7.0.4-7ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

root@86ff9fde8472:/zyz/site/trunk# cat test.php
<?php pcntl_fork();
root@86ff9fde8472:/zyz/site/trunk# php test.php
PHP Warning: pcntl_fork() has been disabled for security reasons in /zyz/site/trunk/test.php on line 1

Revision history for this message
zhixin (phalcon-8) said :
#6

disabled reason has found, In the configuration file is disabled , thanks