Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

php 7.3.8 zip extension missing From macOS 10.15 Catalina

Any idea where to find and install? It wasn’t installed during installation of macOS 10.15 Catalina.


Thanks in advance. David

Posted on Oct 12, 2019 8:23 AM

Reply
Question marked as Best reply

Posted on Oct 25, 2019 8:01 AM

OK. Here is how you do this. The instructions haven’t changed, in principle, from what I posted in Setting up a local web server on macOS 10… - Apple Community. There, I just link to this site that describes the basic procedure. As you might expect, there are a few more complications than there were in 2011 with OS X Lion. Here is what you do:


  1. You’ll need the Command Line tools for this. If you don’t already have them, run “gcc” from the command line to trigger the install.
  2. Download php 7.3.8 from the usual place. Make sure to dig into the archives to get this exact version to match what is on Catalina.
  3. Expand the source. This will give you the source code to the zip module that you will need.
  4. You will need the autoconf module to build the module. You’ll have to download that from the usual place and install into /usr/local.
  5. You will also need libzip. Download that.
  6. Alas, libzip has been updated substantially since I last used it. It is now based on CMake! <spits>
  7. Download and install CMake.
  8. Hack up your environment and put path to the every-so-hacky cmake tool into your PATH. Don’t try to get clever with an alias. That won’t work. 😄
  9. Once you have CMake installed, you can build and install libzip using the simple 6-step CMake build procedure. So simple!
  10. Now go back to your php source for the zip module and build that. I’ll save you some effort and suggest that you use the following configure line:


CFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/php/main -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/php/Zend -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/php/TSRM -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/php" ./configure --with-zlib-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr --with-php-config=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/bin/php-config

(Don't worry about the colours, that's just the forums formatting.)
(Forum software is a beast. Scroll right.)


  1. (Sorry about the forum numbering. This is step 10.)
  2. Now make the module, but don’t attempt to install. Well, you can attempt it. It won’t work.
  3. Create a directory /usr/local/lib/php/extensions for your modules
  4. Manually copy the zip.so file from modules into /usr/local/lib/php/extensions
  5. Copy the file /etc/php.ini.default to /etc/php.ini
  6. Edit /etc/php.ini and set your extension_dir path to /usr/local/lib/php/extensions
  7. In /etc/php.ini, look for the extensions section add add a line for zip, like so: “extension=zip"
  8. Restart Apache
  9. Reload info.php (from the instructions listed above) and verify that zip is now included.


Easy, peasy!



19 replies

php 7.3.8 zip extension missing From macOS 10.15 Catalina

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.