Use custom PEAR packages

Last change on 2026-05-18 • Created on 2026-05-18 • ID: MA-8EB5B

PEAR is an older package and library system for PHP. If your application requires PEAR packages, you can set them up locally depending on your account or upload them manually to your webspace.

Requirements

If your account supports SSH, you can set up a local PEAR repository.

You can find instructions here.

If your account does not support SSH, you can upload the required PEAR packages manually.

Use PEAR packages without SSH

Download the required PEAR packages from the official PEAR website and save them in a subdirectory of your public_html directory.

Example:

public_html/pear/

After that, you need to adjust the PHP include_path so that PHP can find the PEAR files.

Set include_path with .htaccess

Create a .htaccess file in the desired directory or add the following line to an existing .htaccess file:

php_value include_path /usr/www/users/FTP_LOGINNAME/PATH_TO_PEAR:.:/usr/local/lib/php/

Replace the placeholders with your own values:

Placeholder Meaning
FTP_LOGINNAME Your FTP login name
PATH_TO_PEAR Path to the directory with the PEAR files

Example:

php_value include_path /usr/www/users/example/public_html/pear:.:/usr/local/lib/php/

Notes

After the change, check whether your application can load the required PEAR packages correctly.

If your application supports modern PHP dependencies, check whether Composer can be used instead of PEAR. Composer is usually the preferred option for current PHP projects.

Table of Contents