> ## Documentation Index
> Fetch the complete documentation index at: https://help.noxity.io/llms.txt
> Use this file to discover all available pages before exploring further.

# PHP PEAR Packages

> Install and manage PHP libraries from the PEAR repository through cPanel's package manager.

PEAR (PHP Extension and Application Repository) is the older of two PHP package systems. Most modern PHP projects use Composer instead, but a few legacy applications and CGI-style scripts still depend on PEAR packages. This tool lets you install them without SSH.

<Frame caption="cPanel home → Software → PHP PEAR Packages">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/software/pear-packages/page-light.png" alt="PHP PEAR Packages with installed list and search" className="block dark:hidden" />

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/noxity/images/cpanel/software/pear-packages/page-dark.png" alt="PHP PEAR Packages with installed list and search" className="hidden dark:block" />
</Frame>

## Install a package

<Steps>
  <Step title="Search the catalog">
    Type the package name into the search box. cPanel queries the upstream PEAR repository and lists matches.
  </Step>

  <Step title="Click Install next to the package">
    cPanel pulls the package and dependencies into your account's PEAR tree, under `~/php/`.
  </Step>

  <Step title="Use it from PHP">
    Add `~/php/` to PHP's `include_path`, or require the package directly:

    ```php theme={}
    require_once 'Mail.php';
    ```

    PEAR packages live under `~/php/<Package>/<Package>.php` once installed.
  </Step>
</Steps>

## Update or uninstall

Both options sit next to **Install** in the **Installed PEAR Packages** list at the top of the page. Updates pull a newer version from PEAR if one is available; uninstall removes the package and its files.

## Why this is rarely the right tool

PEAR is in maintenance mode. The vast majority of useful PHP libraries are now on Packagist and installed with Composer. If a package is available both via PEAR and via Composer, prefer Composer:

```bash theme={}
composer require monolog/monolog
```

Composer doesn't need root, doesn't go through cPanel, and resolves dependencies properly per project. Use PEAR only when:

* A specific legacy script demands it (e.g., older Horde or osTicket installs).
* You're maintaining a script that already imports PEAR-style packages and changing it is out of scope.

## Common issues

<AccordionGroup>
  <Accordion title="The package list is empty or won't load">
    The PEAR repository was unreachable when cPanel last refreshed. Wait a minute and reload. If it's still empty, the upstream `pear.php.net` may be down. Check [pear.php.net](https://pear.php.net) directly.
  </Accordion>

  <Accordion title="Class not found after install">
    Either the include path doesn't include `~/php/`, or you imported the wrong file. Run `pear list` over SSH to confirm the package is registered, then check its install location.
  </Accordion>

  <Accordion title="The package needs a PHP extension I don't have">
    Many PEAR packages depend on extensions like `mbstring` or `xml`. Toggle them on via [Select PHP Version](/web-hosting/cpanel/software/select-php-version/extensions).
  </Accordion>
</AccordionGroup>

## Need a hand?

<CardGroup cols={2}>
  <Card title="Open a ticket" icon="life-ring" href="https://members.noxity.io/submitticket.php">
    Best for anything that needs an account check or a config change on our end.
  </Card>

  <Card title="Live chat" icon="messages" href="https://noxity.io/contact">
    Faster for quick questions during business hours.
  </Card>
</CardGroup>
