Foreword
Lately, when attempting to install extensions for MAMP, I’ve had a difficult time making my extensions work properly because my Darwin ports settings seem to override. Fortunately, I recently found a blog post with instructions that worked. There are a few steps that are different, however, for getting this to work with version 1.9. Therefore, I decided to post the original instructions with those modifications here.
Acknowledgments
The following instructions are modified for MAMP version 1.9 and originally posted by Saverio at http://developers.enormego.com.
Instructions
- Download MAMP’s “Source” package, located here. If the link doesn’t work, look for and download the MAMP_components_1.9.dmg file located on this page: http://sourceforge.net/projects/mamp/files
- Mount the DMG image and look for the PHP version that you’re using (php-5.2.13 or php-5.3.2) and unzip that archive. (Use the Archive Utility. Mine gets extracted to my Downloads folder.)
- Open terminal and cd to the PHP directory that you just unzipped (/Users/you/Downloads most likely.)
- Run the following command in terminal:
./configure –prefix=/tmp/php - Wait for the configure script to finish and then run:
export PATH=/tmp/php/bin:$PATH - Now, cd to the zip extension directory:
cd ext/zip - Run:
phpize - Run:
./configure - Wait for it to finish and then run:
make - Wait for it to finish and then run:
sudo make install — (You’ll need to type your administrative password.) - After it’s done running, you’ll see something like this:
Installing shared extensions: /usr/lib/php/extensions/no-debug-non-zts-20060613/ - Copy the zip.so extension file from that directory to your PHP installation’s extension directory:
cp /usr/lib/php/extensions/no-debug-non-zts-20060613/zip.so /Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20060613/
0