June 13 2012 10:30 CET
Since OSX Lion comes prepackaged with both Apache2 and PHP 5.3.8 it is pretty easy to setup local PHP development.
However, installing extensions is not straight-forward.
That is, until you setup PECL. PECL and PEAR by default aren’t installed on OSX Lion.
To correct this:
cd /usr/lib/php sudo php install-pear-nozlib.phar
This will install PECL and PEAR.
Now you will be able to install extensions such as
sudo pecl install geoip
Remember to add
extension=geoip.so or similar in
/etc/php.ini and restart Apache2 (
sudo apachectl restart).