Install the PEAR/PECL libraries for PHP
Somewhere between the 10.6 and 10.6.6 releases of Snow Leopard Server, Apple removed the PEAR/PECL libraries for PHP. Use these steps to add the libraries:
- Open a terminal session (either in a VNC session or by opening terminal on your remote Mac and opening an SSH session to the server) and from your home directory enter curl http://pear.php.net/go-pear > go-pear.php The libraries will be downloaded to your server.
- At the prompt, enter sudo php -q go-pear.php You’ll be prompted to install the “pear” command and related packages. Press Return to continue.
- You’ll be prompted for an HTTP proxy. Press Return for none and to continue.
- You’ll be prompted for the directories for the libraries and related packages. All of the default options are correct except for the Installation prefix ($prefix). This must be changed to /usr/local; do so by selecting the element to edit and change it.
- When you’ve changed the Installation prefix ($prefix) to /usr/local, press Return. You’ll be prompted to install several PEAR packages. Enter “y” and press Return. The libraries and packages will be installed.
- Important note: The PEAR installer will report multiple deprecation warnings. Just ignore them.
- You’ll be prompted to have the PEAR installer edit your php.ini configuration file. Enter “y” and press Return. Your php.ini configuration file will be updated.
- You’ll be prompted to press Return to continue. Do so. The PEAR installer will report that the “pear” command is available at /usr/local/bin/pear and you’ll be returned to your shell prompt.
Follow these steps to install PECL uploadprogress:
- Open a terminal session (either in a VNC session or by opening terminal on your remote Mac and opening an SSH session to the server) and from your home directory 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 /private/etc/php.ini and add extension=uploadprogress.so to the Extensions section of the file.
