Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MAMP PRO for Mac OSX - Installing PHP ZIP extension

From Terminal

# install dependencies
brew install autoconf # required by pecl 
brew install libzip


# install zip extenion in your selected MAMP PHP version 
ls /Applications/MAMP/bin/php/
cd /Applications/MAMP/bin/php/php[Version]bin
pecl install zip

# edit php.ini in your selected MAMP PHP version 
ls /Applications/MAMP/conf/p*
cd /Applications/MAMP/conf/php7.3.8/ 
echo "extension=zip" >> php.ini

thanks @kk-gjyang for the fix

@LankyFrog
Copy link

LankyFrog commented Dec 14, 2020

Make this version available on the command line

Thank you, this is the problem. Sometimes I feel I need to have a native setup over the MAMP

@riggerz29
Copy link

riggerz29 commented Feb 10, 2021

Make this version available on the command line

Thanks you, this helped me out lots.

@amrikarisma
Copy link

amrikarisma commented May 29, 2021

thank you, problem solved for me

@xicubed
Copy link

xicubed commented Jun 10, 2021

It seemed like it wasn't running the right composer or php or something. After installing the zip.so I still had to run it by explicitly specifying paths for my php, ini and composer...

/Applications/MAMP/bin/php/php7.4.9/bin/php -c "/Library/Application Support/appsolute/MAMP PRO/conf/php7.4.9.ini" /Applications/MAMP/bin/php/composer update

@BenjaminHoegh
Copy link

BenjaminHoegh commented Nov 5, 2021

I get this message when try to run pecl install zip

WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user

@Gtrujillo
Copy link

Gtrujillo commented Aug 9, 2022

when I use pecl install zip I get No releases available for package "pecl.php.net/zip"

Which was solved with sudo pecl install zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment