Installing PCNTL manually in cPanel Server

PCNTL is Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination.
Sample Error: when PCNTL requires for some accounts and it is missing on the server.

Fatal error: Call to undefined function pcntl_fork() in /path/blah.php on line 5
The PCNTL installation option is not available through cPanel by default, but we can install it manually without any issue.

The following simple steps would help you.

If you want to add –enable-pcntl to all PHP4 compilations, do this:

Create a file called: /var/cpanel/easy/apache/rawopts/all_php4
Add this to the file: --enable-pcntl

If you want to add –enable-pcntl to all PHP5 compilations, do this:

Create a file called: /var/cpanel/easy/apache/rawopts/all_php5
Add this to the file: --enable-pcntl

If you want to add –enable-pcntl to a specific version of PHP, say 5.2.6 , do this:

Create a file called: /var/cpanel/easy/apache/rawopts/PHP-5.2.6
Add this to the file: --enable-pcntl

Then rebuild apache and php using /scripts/easyapache

Once it is done confirm if pcntl is there either by creating a phpinfo page or from the php module list(php -m).

Advertisements
  1. No trackbacks yet.

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

%d bloggers like this: