How to install a PEAR Module

With your hosting account as Web Hosting Hub, you can install PEAR modules through your cPanel. As this is an advanced web hosting tool we are not able to provide technical support on PEAR modules, however we do provide a guide to assist you in installing a PEAR module.

Custom Installation of a PEAR Module

1. Create a directory outside your public_html called "pear." This folder will require permissions of 777. Then, create another folder in your public_html. For purposes of this examples, the folder we are creating is called "pear-examp"

2. Go to http://pear.php.net/go-pear and copy the contents of that page into a Notepad file called "go-pear.php" and upload this file into pear-examp

3. In your browser, go to http://yourdomain.com/pear-examp/go-pear.php. From here, the only field you should need to edit is the installation prefix, which will be the absolute path to the 'pear' directory that you created: /home/username/pear (with username being your Web Hosting Hub username).

You will also want to set the php CLI path in question 11. The path to the php binary is /usr/bin/php.

4. Once the installation is complete, Pear has been installed on your site. You will need to make sure to set the include path in your scripts to show the same path as your installation, and not the one on the server:

5. From here you can also install your own pear packages. To do this, you can create a file called "install.php" in your pear-examp directory and add this code:

include_once "../../pear/index.php";

When you load this page in a browser (http://yourdomain.com/pear-examp/install.php) you will see the PEAR installation interface, where you can install your own PEAR modules.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)

The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.

How did you find this article?

Please tell us how we can improve this article:

Email Address

Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1026
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1033
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/DependencyDB.php on line 554
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/DependencyDB.php on line 558
Using previously installed installer ... ok
Preparing installer..................
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Command.php on line 137
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Command.php on line 154
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Frontend.php on line 91
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1026
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1033
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1026
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1033
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/ChannelFile.php on line 199
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/ChannelFile.php on line 1504
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/ChannelFile.php on line 1516
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/ChannelFile.php on line 1524
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/ChannelFile.php on line 1527
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Common.php on line 492
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Common.php on line 511
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Common.php on line 530
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Common.php on line 574
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Common.php on line 607
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Common.php on line 629
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Updating channel "doc.php.net"
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Downloader.php on line 243
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Downloader.php on line 259
Channel "doc.php.net" is up to date
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Updating channel "pear.php.net"
Channel "pear.php.net" is up to data
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Registry.php on line 1183
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
Installing selected packages..................
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Command/Install.php on line 331
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Command/Install.php on line 343
Deprecated: Assigning the return value of new by reference is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Command/Install.php on line 1139
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1026
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gcgunu5/pear/PEAR/PEAR/Config.php on line 1033

This is simply caused by the PHP function being deprecated. The installation was completed, but there are warning because it is calling functions from PHP that are for an older version. The module, however, was still installed correctly based on the logs you have provided.