"[ERROR] php-zip extension needs to be enabled!" When using gpm

First time user here so please be gentle!

I installed Grav (with Admin) from the zip and it appears to work perfectly.

Until I try to install a theme. Then I get the above error. The problem is that according to phpinfo the feature described in the help documents is installed and enabled already.
So why the error and how do I fix it?

This is what phpinfo shows for zip

Zip enabled
Zip version 1.15.6
Libzip headers version 1.6.1
Libzip library version 1.6.1

Any assistance gratefully received.

Follow up …

Further study of the docs showed me how to install via the Admin interface - and that works.

Weird … so my immediate problem is solved but why the error in the first place? Only thing I can think of is that the PHP being used from my command line is not the same as is used when in the browser. No idea how to check but …

if you have terminal access / command line access try
php -v
php --ini

With the information returned it will show where the current php.ini and php directory it is being run.

php --re zip (php --re ) will return the information of the version and if it is enabled.

Different “stacks” may configure a different version of php to load, when apache loads, so might be why you got differences.

Glad your sorted though :slight_smile:

Thanks for that - never done much with the PHP command line stuff.

Looks like it is pointing to the default install on my Mac - not the MAMP instance I am running Grav in. And as suspected zip is not enabled in that version.

One more thing to understand in this wonderful Unixy/Linuxy world!

Thanks for your help.

One question that does come out of this - is it possible to persuade phar to use a different zip? php -i shows that I have gzip (and others including bzip2) enabled in this config. Be nice to use that instead of fighting with installing an additional component.

Thank you Glad I could help… yep I am still a noob to grav… but come from a support background… but there is some great people on here… and the discord chat channel is great. Happy learning !

I can’t thank you enough for this. If you are representative of the helpfulness of this community I think I’ll be hanging around!

I have had abortive attempts to install composer in the past but could never get ti to work - never saw the post on that that you referenced and it looks as if it will do the job for me.

Thanks again.