How to Install PHP Pear Packages in cPanel
Many PHP PEAR packages are already included with cPanel. You can see the system-installed modules within cPanel. If the extension is not listed, you can install additional PHP PEAR packages. Learn how to install PHP PEAR Packages in cPanel.
- How to Check for System Installed Modules in cPanel
- How to Install PHP Pear Packages in cPanel
- How to Manually Install PHP Pear Packages
- How to Configure the php.ini File for Installed PEAR Packages
- Summary
How to Check for System Installed Modules in cPanel
- Log in to your Bluehost Account Manager.
- Click the Hosting tab from the left menu.
- Scroll down to Quick Links and click the CPANEL button.
- Under Software, click the PHP PEAR Packages icon.
- Scroll down to the bottom of the page and click on the Show System Installed Modules button.
A list of system-installed modules will be shown. To install additional PHP Pear Packages, proceed with the steps below.
How to Install PHP Pear Packages in 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 manager.
- Log in to your Bluehost Account Manager.
- Click the Hosting tab from the left menu.
- Scroll down to Quick Links and click the CPANEL button.
- Under Software, click the PHP PEAR Packages icon.
- Use the search box or click the Show Available Modules button.
- You can use the Search field to find the extension you need to install to check and see if it is available. Click the Go button.
- If you click on the Show Available Modules button, it will show all the PHP extensions and applications that you can install.
- To install, you can either:
- Click on the Install icon.
- Enter the PHP Extension or Application to install in the empty field, then click the Install Now button.
- Click on the Install icon.
- Follow the php.ini configuration steps shown below.
How to Manually Install PHP Pear Packages
If the PEAR Package is not already installed and is not available to install via cPanel, you may install the package manually by following these steps:
- Download the PEAR package 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.
- For instructions on how to upload a file in the File Manager, please see How to Upload Files Using File Manager.
- Extract the file (if needed).
- Follow the php.ini configuration steps shown below.
How to Configure 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.
- If you need instructions on how to navigate the file manager, check out How to Navigate cPanel File Manager.
- Locate the line that 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 choose 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.
Summary
Learn how to install PHP PEAR packages in cPanel with our step-by-step guide. You can either install available PHP extensions and applications within cPanel or manually install them if they are not available in cPanel. After installation, configure the php.ini file for scripts to use PEAR packages that have been installed.
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: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.