How do I use and install PEAR packages?

This page is showing a generic answer.
To see a more detailed answer customized for you, type your domain name here:

PEAR packages are files that contain prewritten PHP code. Some scripts use PEAR packages to perform tasks such as connecting to a database.

Our Web hosting service supports PEAR, and we have the following "stable" packages installed:

Archive_Tar            HTML_Template_IT        Net_Ident
Auth                   HTTP                    Net_LMTP
Auth_SASL              HTTP_Client             Net_NNTP
Benchmark              HTTP_Request            Net_POP3
Cache                  Log                     Net_Ping
Cache_Lite             MDB2                    Net_Portscan
Console_Getopt         MDB2_Driver_mysql       Net_SMTP
Crypt_CBC              Mail                    Net_Sieve
Crypt_CHAP             Mail_Mime               Net_SmartIRC
Crypt_HMAC             Math_Integer            Net_Socket
Crypt_RC4              Net_CheckIP             Net_URL
DB                     Net_Curl                Net_UserAgent_Detect
DB_NestedSet           Net_DNS                 Net_Whois
Date                   Net_DNSBL               Numbers_Roman
File                   Net_Dict                PEAR
File_Find              Net_Dig                 Pager
File_Passwd            Net_FTP                 Structures_Graph
File_SearchReplace     Net_Finger              Text_Password
HTML_Common            Net_Geo                 XML_Parser
HTML_Form              Net_IMAP                XML_RPC
HTML_QuickForm         Net_IPv4                XML_Serializer
HTML_Table             Net_IPv6                XML_Util

Other stable packages can usually be installed on request.

Installing other PEAR packages

If you want to install a PEAR package that is not "stable" (that is, a package marked "alpha" or "beta" on the PEAR Web site), you can do so by creating your own PEAR directory.

To do this, you should be comfortable with the command line. Just make a command line connection, then type the following two lines after logging in (you can copy and paste them from here):

pear config-create ~ .pearrc
pear install -o PEAR

This creates a custom PEAR directory located in your home directory.

You can then install your own PEAR modules at any time by typing this:

pear install --alldeps PACKAGE

... where "PACKAGE" is the name of the package, followed by "-alpha" or "-beta".

For example, to install the beta version of the Spreadsheet_Excel_Writer package, you would type:

pear install --alldeps Spreadsheet_Excel_Writer-beta

Using custom PEAR packages you install

Once you've installed a package, you'll need to tell your PHP script where to find it. Enter your domain name in the box at the top of this page to see how to do this.

What if I have more questions about PEAR?

The instructions above are based on the PEAR documentation, which has more details and resources for answering questions. You should read the PEAR documentation if you have further questions about PEAR.