Upgrading to 10.15.1 (19B88) Mac OS Catalina broke my PHP 7.3.9 development environment.
$zip = new \ZipArchive;
Yields Exception 'Error' with message 'Class 'ZipArchive' not found'
zip and unzip are installed at Terminal command line.
Trying to use PECL failed. Trying to use Homebrew failed.
Do you know how to properly install ZipArchive manually on MacOS?
I had the same problem and this is what helped me. Basically what I did is I just installed php using brew and then linked the php that I have installed using brew inside of httd.conf file. Here are the steps:
Install php using home brew
brew install [email protected]
This will install php. Now we need to link it
brew link [email protected]
If the command above wont work because of the missing directories, then just create them using mkdir
and run it again.
Open the httpd.conf file which is located here /private/etc/apache2/httpd.conf Open it and change this line
LoadModule php7_module libexec/apache2/libphp7.so
to this:
LoadModule php7_module /usr/local/Cellar/php/7.3.11/lib/httpd/modules/libphp7.so
What this basically dow is it just makes apache to use php that is installed using homebrew. Hope this was helpful to you.
Here is a link where it is better described how to connect homebrew installed php:
How to use the php that brew installed?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With