Enable PNCTL Extension to PHP (Ubuntu 14.04)

Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination. Process Control should not be enabled within a web server environment and unexpected results may happen if any Process Control functions are used within a web server environment.

I have spend a day enabling this extension. I have searched a lot, but failed every single time because, I have missed a single line of command. So, here are the steps I followed and get it done.

Create a directory
mkdir /tmp/phppnctl

cd /tmp/phppnctl

Fetch the PHP source
apt-get source php5

cd /tmp/phppnctl/php5-*/ext/pcntl

Run this command

Run this command

Make the object

cd modules

Copy the file
cp pcntl.so /usr/lib/php5/<long number like 201090621>/

Enable extension to ini file
echo "extension=pcntl.so" > /etc/php5/mods-available/pcntl.ini

Execute this command
php5enmod pcntl

Restart Apache
service apache2 restart

$ php -m | grep pcntl
$ pcntl



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s