How to enable PCNTL on Ubuntu server 16.04

fralbo picture fralbo · Nov 3, 2016 · Viewed 18.5k times · Source

I'm wondering how to enable pcntl extension in PHP7 running on Ubuntu server 16.04.
I saw this http://www.crimulus.com/2010/07/30/howto-enable-pcntl-in-ubuntu-php-installations/ but do we really have to recompile PHP7?

It surprises me as other extensions are usually simple to add with apt-get.

Thanks

Answer

Alex Chiang picture Alex Chiang · Jan 12, 2017

You don't need apt-get install anything else.

pcntl module was included when you installed php by package manager, try to sudo apt update then sudo apt-get upgrade, it may be helpful. You can also use this to confirm if you have or don't have it.

php -i | grep pcntl
//pcntl suppport=>enable

Also list all my installed module by package manager.

sudo apt install php7.0 php7.0-cli php7.0-common php7.0-fpm php7.0-imap php7.0-json php7.0-mbstring php7.0-opcache php7.0-readline php7.0-xml