Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for PHP zip extension to Status Report #3978

Open
3 tasks
jenlampton opened this issue Aug 13, 2019 · 12 comments
Open
3 tasks

Add check for PHP zip extension to Status Report #3978

jenlampton opened this issue Aug 13, 2019 · 12 comments

Comments

@jenlampton
Copy link
Member

jenlampton commented Aug 13, 2019

We've had multiple reports of problems with the PHP zip extension - or, more specifically, sites that DO have the PHP zip extension installed, reporting that they DO NOT.

See this forum topic: https://forum.backdropcms.org/forum-topic/php-zip-extension-issue-192?page=0%2C0#comment-1219

TODO:

  • Use a better check for the PHP zip extension
  • Add the zip extension to the list of installed php extensions on the status report
  • If not done already, add a check for the zip extension into hook_requirements for the installer module
@klonos
Copy link
Member

klonos commented Aug 13, 2019

Use a better check for the PHP zip extension

Care to elaborate on this one?

@jenlampton
Copy link
Member Author

jenlampton commented Aug 13, 2019

I won't know the technical detalis until I look at the code, but if the check we are using now says that zip is not installed when it actually is installed, then we need to use a different check: one that works ;)

edit: I have updated the original ticket to make this problem more clear.

@tuxrouge
Copy link

tuxrouge commented Aug 14, 2019

to solve it I just had to clear the cache
(find here #2717)

@stpaultim
Copy link
Member

It has been reported in the forum, that this is still an issue: https://forum.backdropcms.org/comment/3430#comment-3430

@indigoxela
Copy link
Member

It has been reported by one person. What we'd need to fix, are steps to reproduce. Personally, I never ran into this problem, so I wouldn't know where to start.

The installer checks like that: array_key_exists('zip', archiver_get_info());

@stpaultim
Copy link
Member

It has been reported by one person.

In the forum topic, at least two people report the problem and they do share additional information about their specific situations. I'm not sure if what they provide is sufficient to help debug this and maybe we'll need to wait for additional information.

@indigoxela
Copy link
Member

It's still puzzling. No steps to reproduce, only a handful of assumptions.

The system module defines the zip archiver in its hook_archiver_info(). So, as soon as the system module is installed, that archiver is available. The updater module does need the zip archiver, but it's installed after the system module.

Yes, archiver_get_info does use static caching, but I wouldn't know of a situation, in which this cache could miss the zip extension.

There might be some sort of race condition, but with core alone it's not reproducible - at least I wouldn't know how. So maybe we'd need to figure out which contrib module might be interfering here. If that's the reason.

@findlabnet
Copy link

webform.install (l.698):
if (!class_exists('ZipArchive'))...

@indigoxela
Copy link
Member

Interesting, webform. But...

if (!class_exists('ZipArchive'))... 

The class does exist, independently from Backdrop (ships with php). The extension is installed and active - confirmed by the posters in forum. And the warning message shown is from core.

@findlabnet do you know of any way to reproduce the warning on install?

@findlabnet
Copy link

hook_requirements in the module install script? At least I did it for php_curl.

@indigoxela
Copy link
Member

hook_requirements in the module install script? At least I did it for php_curl.

How does that help to reproduce the problem reported in the forum? Have you been able to?

@findlabnet
Copy link

Sorry, it looks like my misunderstanding of beginning of this topic.
Moreover, I have not used either the Hyper-V VM or the Project installer, so I have nothing to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants