I'm using macOS Catalina version 10.15. At the beginning, I was able to use MAMP PRO with Port 80. However, after I failed to run composer install
inside a project at /applications/mamp/htdocts/project/
because of a missing extension ext-zip of PHP as below:
Problem 1
- Installation request for phpoffice/phpspreadsheet 1.10.0 -> satisfiable by phpoffice/phpspreadsheet[1.10.0].
- phpoffice/phpspreadsheet 1.10.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
Problem 2
- phpoffice/phpspreadsheet 1.10.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- maatwebsite/excel 3.1.17 requires phpoffice/phpspreadsheet ^1.6 -> satisfiable by phpoffice/phpspreadsheet[1.10.0].
- Installation request for maatwebsite/excel 3.1.17 -> satisfiable by maatwebsite/excel[3.1.17].
I decided to install php
via homebrew
in Terminal. After successfully installed by the following commmand
brew install php@7.3
# php -v
PHP 7.3.8 (cli) (built: Aug 24 2019 19:38:14) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
#which php
/usr/bin/php
As a result, I cannot use MAMP PRO with Port 80 anymore nor does it resolve the missing extension ext-zip problem.
I have a couple questions that cannot wrap my head around:
- If the
built-in php
has been always there, how could I use the Port 80 in the beginning? - is the
built-in php
with macOS always running? How to know inside of a project that which php is being used? (macOS or MAMP)??
What I have tried:
- Attempt to uninstall php
version that I have installed by brew uninstall php@7.3 --force
.