3

I"ve upgraded my Mac with Big Sur OS. I'm trying to install opencart in my local laptop but getting error

ZIP extension needs to be loaded for OpenCart to work!

Have attaching the screenshot for reference. I"ve tried all the possible way to solve this, updated CLI for Xcode, ran the commands brew update, brew install php@7.3, brew link php@7.3, brew install php7.0-zip and many others but nothing is working..

The extension=zip.so is enabled in php.ini but it's not at all loading. What's missing or going wrong?

enter image description here enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44
David
  • 539
  • 3
  • 9
  • 23

3 Answers3

2

I've only encountered this issue on Big Sur, but may help on Catalina.

If you have installed through brew (I'm using 7.4)

Using the following command:

brew install php@7.4

Type the following into the command line to see if pecl is installed:

pecl version

As long as this command returns something, run this command:

pecl install zip

That should solve your issue :)

Rhys Sharratt
  • 39
  • 1
  • 3
0

I also tried and reinstall php 7.3 and other stuff from other solutions in the internet but the next one is helped me:

just move server solution stack from Ampps 7.3 to Xampp 8.0 and the issue with Zip will be gone

Alexey Nikonov
  • 4,958
  • 5
  • 39
  • 66
0

I've still no solution but at least a way to go which I've tried with php@7.4 and php@7.3

  • Download the latest tarball from https://pecl.php.net/package/zip

  • Install a dependency: brew install pcre2

  • fix a symlink, but check the version of your php (which php) and pcre2 (which pcre2) ln -s /opt/homebrew/Cellar/pcre2/10.40/include/pcre2.h /opt/homebrew/opt/php@7.3/include/php/ext/pcre/pcre2.h

  • Now install PHP zip extension sudo pear install ~/Downloads/zip-1.20.1.tgz
    This should be the result:

Installing '/opt/homebrew/Cellar/php@7.3/7.3.33_2/pecl/20180731/zip.so' install ok: channel://pecl.php.net/zip-1.20.1 Extension zip enabled in php.ini

  • After a restart of apache the zip extension should work but it does not sudo apachectl restart

I am going to file a help request at https://github.com/pierrejoye/php_zip

user3072843
  • 308
  • 3
  • 13