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/
Update
As of MAMP version 1.9.3, the zip extension is included. Thus, the easiest way to get it, is to upgrade. Consider this post DEPRECATED!
Could you please post the zip.so (for 5.3.2)?
I actually built the extension for 5.2.13, so I don’t have it for 5.3.2. Seems like I was able to get this working for another 5.3 extension though, but it required a change to either a make config file or an environment variable (wish I would have documented that!) Perhaps, I’ll try compiling this module for 5.3.2. If I do, I’ll be sure to post the method and the binary (I’ll also send you an email to let you know.)