Loading...

Knowledge Base
Up to 75% off on hosting for WordPress websites and online stores

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

  1. Log in to your Bluehost Account Manager.
  2. Click the Hosting tab from the left menu.
    Hosting option
  3. Scroll down to Quick Links and click the CPANEL button.
    CPANEL button
  4. Under Software, click the PHP PEAR Packages icon.
    PHP PEAR Packages icon
  5. 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.

  1. Log in to your Bluehost Account Manager.
  2. Click the Hosting tab from the left menu.
    Hosting option
  3. Scroll down to Quick Links and click the CPANEL button.
    CPANEL button
  4. Under Software, click the PHP PEAR Packages icon.
    PHP PEAR Packages icon
  5. Use the search box or click the Show Available Modules button.
    Search Field or 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.
  6. To install, you can either:
    • Click on the Install icon.
      Available PHP Extensions and Applications
    • Enter the PHP Extension or Application to install in the empty field, then click the Install Now button.
      Install Now button to Install PHP PEAR Packages cPanel
  7. 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:

  1. Download the PEAR package from pear.php.net.
  2. 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.
  3. Extract the file (if needed).
  4. 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.

  1. Open the php.ini file with a standard text editor or code editor. You may use the file manager edit tool.
  2. 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

  3. 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.

Did you find this article helpful?

 
* Your feedback is too short

Loading...