The following will instruct you how to get PEAR working perfectly on your Mac OS X 10.11 El Capitan and earlier versions of OSX including Yosemite and Mavericks..
Launch Terminal (found in Application folder), Enter the following to move to the home directory.
Check pear version if you have ever installed it.
If not, use the following command line to get it.
curl -O http://pear.php.net/go-pear.phar
How to Install Pear?
php -d detect_unicode=0 go-pear.phar
You should now be at a prompt to configure PEAR. The installation then will suggest the file locations based on your home directory.
* Type 1 and press Enter (Return key)
* Enter the following
- Hit the Enter key
How to check if PEAR has just been installed? use the following command line
And then, the result must come up something similar to the following:
PEAR Version: 1.10.1
PHP Version: 5.5.5
Zend Engine Version: 2.5.0
Running on: Darwin 192-168-1-9.tpgi.com.au 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_6