Install the PEAR/PECL libraries for PHP
Mac OS X 10.7.x Lion is distributed with PEAR but not installed. Use these steps to install PEAR:
- Open a terminal session and enter cd/usr/lib/php.
- Enter sudo php install-pear-nozlib.phar.
- With your text editor of choice, edit the /etc/php.ini file.
- Find the line: ;include_path = “.:/php/includes” and change it to include_path = “.:/usr/lib/php/pear”.
- Add the following to the end of the /etc/php.ini file: [oauth]
extension=”/usr/lib/php/extensions/no-debug-non-zts-20090626/oauth.so”. - Save the /etc/php.ini file.
- Back in your terminal session, enter sudo pear channel-update pear.php.net.
- Enter sudo pecl channel-update pecl.php.net.
- Enter sudo pear upgrade-all.
- Enter sudo pear channel-discover pear.phpunit.de.
- Enter sudo pear channel-discover components.ez.no.
- Enter sudo pear channel-discover pear.symfony-project.com.
- Alternatively, enter sudo pear install phpunit/PHPUnit.
- Alternatively, enter sudo pear install phpunit/phpcpd.
- Alternatively, enter sudo pear install PHP_CodeSniffer.
Enter sudo apachectl restart to restart Apache.
Download and install the PECL OAuth component using these steps:
- Download the latest PCRE source code and unzip on your desktop.
- Open a terminal session and enter cd ~/Desktop/pcre-8.12.
- Enter ./configure.
- Enter sudo cp pcre.h /usr/include/.
- Enter sudo pecl install oauth.
- With your text editor of choice, edit the /etc/php.ini file.
- Add the following to the end of the /etc/php.ini file: [oauth]
- extension=”/usr/lib/php/extensions/no-debug-non-zts-20090626/oauth.so”.
- Save the /etc/php.ini file.
- Open a terminal session and enter sudo apachectl restart to restart Apache.
Follow these steps to install PECL uploadprogress:
- Open a terminal session and enter: sudo pecl install uploadprogress. PECL upload progress will be installed and you’ll be prompted to edit your php.ini configuration file to include >extension=uploadprogress.so.”
- In your text editor of choice, open /etc/php.ini and add extension=uploadprogress.so to the end of the /etc/php.ini file.
- Save the /etc/php.ini file.
- Open a terminal session and enter sudo apachectl restart to restart Apache.
