Jump to content

Session: ZipArchive class is required and your PHP does not appear to have it.


Claus
 Share

Recommended Posts

Hello people

When trying to install a module via a ZIP-file I am getting the following error:

Session: ZipArchive class is required and your PHP does not appear to have it.

I don't understand why this happens! I have the latest and greatest PHP 5.6.9 and path to the extensions is correct, and the Zip-extension should be built-in (since 5.3.0 I think).

I'm only encountering this on a OpenSUSE Tumbleweed box, where I have php5-devel installed. My check_php.php file show that the Zip and Zlib listed under 'Modules'.

What to do?

Link to comment
Share on other sites

Aha! Solved it, so I'm going to answer my own question in case someone else runs into this.

The PHP must be compiled with the option ZIP to *really* have it "built-in". In the case of this OpenSUSE build, it is not, and must instead be installed using PECL. Initially the PECL install didn't seem to work, eg. `sudo pecl install zip`, until I realized that it needed the path too `sudo pecl install pecl/zip`, but then it worked.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...
  • 2 years later...

I'm also struck by this issue and currently clueless.

I have a MAMP Pro setup, lots of ProcessWire sites and all of them can download and unzip Modules from the directory except one, which is a ProcessWire 3.0.83 site I recently started to work with.

There are no other notable differences. Same environment, similar setup and the main difference is that any ProcessWire sites prior to version 3.0.83 can unzip the modules, this problematic one running PW 3.0.83 cannot. Note that on my production server the very same site (its clone) can actually unzip the files so it must be something about my local environment but it is hard to tell what to look for when all other sites can do it.

Any ideas on how to fix it are appreciated :)

Link to comment
Share on other sites

13 minutes ago, FrancisChung said:

Have you tried upgrading one of the working sites to 3.0.83 and tried unzipping, just to be 100% sure it is 3.0.83 that is causing it?

No I did not but just to make sure: I've just upgraded one site to PW 3.0.83 and it makes no difference. I had another idea and set the admin theme to Default from UIkit and this time it worked! Afterwards I set it back to UIkit and it started to work with this admin theme as well. Weird ...

Anyway, thanks for the tip!

Link to comment
Share on other sites

I'm still having this issue, because a few hours later PW cannot unzip the module files but this time on the production server :( I tried switching the admin themes back and forth but it did not help. It is hard to analyze such inconsistent behavior. Other sites are not affected, not even on the production server. Only this 3.0.83 instance is the problematic one.

Link to comment
Share on other sites

I have some subtle issues between my dev environment (OS/X) and my production environments (Unix Hosted). I always suspected the subtle difference between the 2 file systems (1 is semi strict on spelling, the other is super strict) that could be a potential contributor. Have you looked out for any subtle spelling mistakes, case changes or encoding changes that could be contributing to this?

  • Like 2
Link to comment
Share on other sites

6 minutes ago, FrancisChung said:

I always suspected the subtle difference

Me too but in this case somehow it "got fixed" in my dev environment and soon after that stopped working in production. This type of seemingly inconsistent behavior is what I hate tracking down. Maybe some permission issues and the error message is just simply misleading, I dunno. I'll wait for PW 3.0.85 and see what happens when I upgrade. It's not a critical issue in the case of this site so I'm trying not waste a lot of time dealing with it.

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...