Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

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

first-time

Solved by Jon Paris View solution

Started by Jon Paris 5 years ago · 5 replies · 2074 views
5 years ago

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.

5 years ago Solution

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 ...

5 years ago

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 <extentsion name>) 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 :)

5 years ago

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.

last edited 05/15/21 by Jon Paris
5 years ago

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 !

last edited 05/15/21 by Spam Hater
5 years ago

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.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 60 16 hours ago
Support · by Anna, 3 days ago
2 66 19 hours ago
Support · by Justin Young, 20 hours ago
1 34 19 hours ago
Support · by Duc , 1 week ago
2 70 6 days ago
Support · by Colin Hume, 1 week ago
2 61 6 days ago