Enable PCNTL in Ubuntu PHP - test fails

前端 未结 5 1695
隐瞒了意图╮
隐瞒了意图╮ 2021-02-08 05:05

I need help on How to: Enable PCNTL in Ubuntu PHP.

$ mkdir /tmp/phpsource
$ cd /tmp/phpsource


$ wget http://museum.php.net/php5/php-5.3.2.tar.gz
$ tar xvf php-         


        
5条回答
  •  我寻月下人不归
    2021-02-08 05:51

    In Ubuntu 15.04, the pcntl is installed in the php CLI, but disabled by default. To enable, edit /etc/php5/cli/php.ini and comment out the line:

    disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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,
    

    If you want these enabled in apache2, then edit the file /etc/php5/apache2/php.ini and make the same change.

    It may be advisable to only remove the functions you need to use, in order to preserve as much of the security restrictions as possible.

提交回复
热议问题