2.2. Downloading and Installing the PEAR Package Manager

Before you can dive into PEAR, you need to install and configure it in your development environment.

If you have PHP version 4.3.0 or newer, you probably already have PEAR installed. However, the PEAR project is relatively new as of this writing, so you might want to make sure you have the most recent version of the PEAR package manager. It handles all the dirty work of installing PEAR packages, managing the registry of installed packages, and checking dependencies.

You can install the PEAR manager two ways: via the Web front end or via the command line. If your application runs in a shared hosting environment and you don't have SSH access to the server, use the Web front end. If you feel more at home with a black screen and a blinking cursor, use the command line. It's really up to you — they both install PEAR on your computer. We explain how to use both methods in the following sections.

2.2.1. Installing via Web front end

To install the PEAR package manager by using the Web front end, follow these steps:

  1. Point your browser at http://pear.php.net/go-pear.

    Your browser displays the PHP source as plain text.

  2. Choose File Save As or File Save Page As (depending on your browser). Save the file as go-pear.php.

  3. Upload the file ...

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.