Overview
Many PHP PEAR packages are already included with cPanel. Click the PHP PEAR Packages icon in the cPanel, then click "Show System Installed Modules." If the extension required is not listed, below are two options for installing additional PHP PEAR Packages.
- Installing PHP PEAR Packages included with cPanel
- Manually installing PHP PEAR Packages
- Configuring the php.ini file for installed PEAR Packages
Installing PHP PEAR Packages included with cPanel
The cPanel includes a selection of PEAR Packages that can automatically be installed. Simply follow these steps to use the cPanel's PEAR Package installer.
- Log in to your RCS Account Manager.
- Click the Hosting tab from the left menu.
- Scroll down to Quick Links and click the CPANEL button.
- Under Programming, click the PHP PEAR Packages icon.
- Use the search box or click the button to show all available PEAR extensions.
- Click the Install Now button next to the extension you wish to install to your account.
- Follow the php.ini configuration steps shown below.
Manually installing PHP PEAR Packages.
If the PEAR Package is not already installed and is not available to install via the cPanel, you may install the package manually by following these steps:
- Download the PEAR package from the internet, and often this will be from pear.php.net.
- Upload the file to the home directory inside the PHP folder. If the PHP folder does not already exist in the home directory, simply create one.
- Extract the file (if needed).
- Follow the php.ini configuration steps shown below.
Configuring the php.ini file for installed PEAR Packages
In order for scripts to use the PEAR package(s) that have been installed with either of the above methods, make sure the php.ini file references the correct php/ directory.
- Open the php.ini file with a standard text editor or code editor. You may use the file manager edit tool.
- Locate the line which begins with include_path. It should look similar to:
include_path = ".:/usr/lib64/php:/usr/share/pear"
Note: If this line begins with a semicolon, remove the semicolon
- Change this path to include the path of your PHP folder (separated by a colon). For example:
include_path = ".:/usr/lib64/php:/usr/share/pear:/home#/username/php"
Where /home#/username/ is the home directory for your account as shown in the main cPanel page on the left stats column.
If you still are unable to use the PHP PEAR package after following these steps, ensure you have modified the php.ini file, which is in the same directory as your PHP script. Alternatively, you may modify the php.ini file in public_html and have chosen a single php.ini from the PHP Config icon in the cPanel. The single php.ini option indicates that all PHP scripts should use the php.ini file found in public_html.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 210-488-5907
- International: 210-488-5907
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.