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_LMTP
Auth			HTTP			Net_NNTP
Auth_SASL		HTTP_Client		Net_POP3
Benchmark		HTTP_Request		Net_Ping
Cache			HTTP_Request2		Net_Portscan
Cache_Lite		Log			Net_SMTP
Console_Getopt		MDB2			Net_Sieve
Crypt_CBC		MDB2_Driver_mysql	Net_SmartIRC
Crypt_CHAP		Mail			Net_Socket
Crypt_HMAC		Mail_Mime		Net_URL
Crypt_RC4		Math_Integer		Net_URL2
DB			Net_CheckIP		Net_UserAgent_Detect
DB_NestedSet		Net_Curl		Net_Whois
Date			Net_DNS			Numbers_Roman
File			Net_DNSBL		PEAR
File_CSV		Net_Dict		Pager
File_Find		Net_Dig			Structures_Graph
File_Passwd		Net_FTP			Text_Password
File_SearchReplace	Net_Finger		XML_Parser
File_Util		Net_Geo			XML_RPC
HTML_Common		Net_IMAP		XML_Serializer
HTML_Form		Net_IPv4		XML_Util
HTML_QuickForm		Net_IPv6
HTML_Table		Net_Ident

Installing other PEAR packages

If you want to install another PEAR package, 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, optionally 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.