Skip to content

Instantly share code, notes, and snippets.

@yehgdotnet
Last active February 7, 2023 13:14
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save yehgdotnet/fd9b86a08c5e0c03fa57ad3ae8217892 to your computer and use it in GitHub Desktop.
Save yehgdotnet/fd9b86a08c5e0c03fa57ad3ae8217892 to your computer and use it in GitHub Desktop.
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

@BenjaminHoegh
Copy link

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

@aacassandra
Copy link

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

not work

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