PHP PEAR packages and Perl modules in cPanel

PHP PEAR packages

  1. Open "PHP PEAR Packages" (group "Software").
  2. Find the package with search or type its name in the install field.
  3. Click "Install Now".
Installing a PEAR package
Installing a PEAR package

Packages go to the php folder in your home folder. Add it to your script:

ini_set('include_path', '/home/USERNAME/php:' . ini_get('include_path'));

Perl modules

  1. Open "Perl Modules".
  2. Enter the module name (as on CPAN, e.g. JSON::XS) and click "Install Now".
Installing a Perl module
Installing a Perl module

Modules go to the perl folder. At the top of your script add:

#!/usr/bin/perl
use cPanelUserConfig;

Modern PHP projects use Composer rather than PEAR. PHP extensions (intl, imagick and so on) are enabled in Select PHP Version.

Questions and answers
In the perl folder of your home folder; add use cPanelUserConfig; to the script.