The Apache and PHP bundled with macOS Catalina 10.15 does not include the PHP ZIP extension. Grav (specifically, the Problems Plugin) detects this issue, and Grav will not run! Here is a workaround.
Follow my guide to configure the macOS-bundled Apache and PHP, and check this out if you have issues with Grav Admin Panel running locally.
Running Grav v1.6.x locally with the current Catalina release (including the most recent update), Grav immediately displays this error:
Getting the ZIP extension involves either:
- Using Brew or similar to install a separate copy of Apache and PHP, or
- Jumping through hoops to compile
zip.so
locally.
Instead I just wanted a quick hack to ignore this error. BEWARE! This means Grav does not know that zip.so
is not available, and any functions that rely on ZIP will fail - including the ability to auto-update.
Option 1: Disable Problems Plugin
- In your Grav folder, navigate to
user/config/plugins/
- Edit
problems.yaml
and disable the plugin:enabled: false built_in_css: true
- Try again.
Option 2: Edit the Problems Plugin
If you want to continue to use the Problems plugin to to detect other problems but suppress ZIP error, then:
- In your Grav folder, navigate to
user/plugins/problems/classes/Problems/
- Edit the file
PHPModules.php
, comment out the$modules_error['zip']
assignment in this block of code:// Check for PHP Zip library $msg = 'PHP Zip extension is %s installed'; if (extension_loaded('zip')) { $modules_success['zip'] = sprintf($msg, 'successfully'); } else { //$modules_errors['zip'] = sprintf($msg, 'required but not'); }
- Try again.
Hope this helps.
FYI at time of writing, I am on Catalina 10.15.5, with Apache 2.4.41 and PHP 7.3.11 - to check:
sw_vers
httpd -v
php -v