There's a few things that could be going wrong here, these are only guesses.
First, there's two include paths you'll need to worry about. The first is your PHP include path. PEAR libraries are (mostly) just PHP code, specially packaged up. When you install a PEAR module you're downloading all the PHP code needed for that library, and any other PEAR libraries the library you're installing rely on (sorry about that sentence, but I'm not sure there's a better way to say that). This include path is set in your php.ini files (one file for your command line php, another for yoru web server php; often the same file).
The second include path you'll need to worry about is your UNIX/shell include path. This is the path that your computer will search for commands in when you enter a command from a terminal. The 'pear' command is a command line command.
So, we need to make sure that
- The php.ini file for your website has the PEAR directory in its include path
- The php.ini file for your command line php application has the PEAR directory in its include path
- Your shell application (terminal, likely BASH in you're on OS X) has the PEAR directory in its include path
So, for number 1, put a PHP page on your server that include the function call
phpinfo();
This will list a bunch of information about your server. Look for the location of php.ini. Open this file in a text editor, look for the include_path variable, and add the path to your PEAR directory (don't remove the other paths, just add yours).
For number 2, run the following from your command line
php -r "phpinfo();" | grep '.ini'
A bunch of lines will print out, look for the one that reads something like "Loaded Configuration File". Open this file in a text editor, look for the include_path variable, and add the path to your PEAR directory (don't remove the other paths, just add yours).
Finally, and this is what I think your problem is, we need to ensure that the pear command line command is in your shell/bash path. That's what this error is refering to
** The 'pear' command is not currently in your PATH, so you need to
There should be a file in your home directory named '.bash_profile'. It's a hidden file, so it won't showup in the Finder. Open it with a text editor. If you're having trouble because this is a hidden file, use the command line pico editor. Ctrl-X will save from pico
cd ~
pico .bash_profile
This file gets executed by your shell everytime you open a terminal window. We're going to add /usr/local/bin to your PATH, which means when you attempt to run a command, yoru computer will search for the command in this folder. Add the following line to the bottom of .bash_profile
export PATH=/usr/local/bin:$PATH
This is, more or less, equivilant to the following PHP code
$PATH = '/usr/local/bin:'.$PATH
You're adding /usr/local/bin as the first colon-delimited place to look for command, and then adding the rest of the existing path to it. Once you've added that line, close your terminal, re-open it, and then type
pear
This should give you a list of valid pear commands, but more importantly will let you know pear is in your path.
Good luck!