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

Upgrade script from rom 3.0.1 to 3.0.2 requires ziparchive, cant upgrade, maybe should output a compatibility message? #9091

Closed
weismannweb opened this issue Aug 16, 2020 · 1 comment
Labels
needs-triage For new issues/PRs that need to be triaged

Comments

@weismannweb
Copy link

weismannweb commented Aug 16, 2020

Bug Description

Related to this: #9016 but not exactly. This was encountered during upgrade instead. I never tried to do what that user did as I was upgrading from 2x to 3.1 to 3.2 in one sitting and never tried to create a form or anything else in the system.

in chrome debug console:
{"errors":[{"message":"Looks like I encountered an error (error #500). If I do it again, please report me to the system administrator!","code":500,"type":null}]}

for this ajax call:
ajax?action=core:updateExtractPackage&_=1597584753…mauticUserLastActive=58&mauticLastNotificationId=
/showmembers

gives this error in log
[2020-08-16 09:33:31] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: "Attempted to load class "ZipArchive" from the global namespace. Did you forget a "use" statement?" at /home/jewishdata/public_html/newsletter/app/bundles/CoreBundle/Controller/AjaxController.php line 419 {"exception":"[object] (Symfony\Component\Debug\Exception\ClassNotFoundException(code: 0): Attempted to load class "ZipArchive" from the global namespace.\nDid you forget a "use" statement? at /home/jewishdata/public_html/newsletter/app/bundles/CoreBundle/Controller/AjaxController.php:419)"} []

| Mautic version |

3.0.1 upgrading to 3.0.2

| PHP version |
PHP Version 7.3.21

Configure Command has '--without-libzip' '--enable-zip=shared'
-- | --

| Browser |
All

Steps to reproduce

  1. try to upgrade from 3.0.1 to 3.0.2 with a server that does not have the ZIP extension built with it or loaded

Log errors

[2020-08-16 09:33:31] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: "Attempted to load class "ZipArchive" from the global namespace. Did you forget a "use" statement?" at /home/jewishdata/public_html/newsletter/app/bundles/CoreBundle/Controller/AjaxController.php line 419 {"exception":"[object] (Symfony\Component\Debug\Exception\ClassNotFoundException(code: 0): Attempted to load class "ZipArchive" from the global namespace.\nDid you forget a "use" statement? at /home/jewishdata/public_html/newsletter/app/bundles/CoreBundle/Controller/AjaxController.php:419)"} []

My Suggestion:

In the upgrade script have a compatibility check warn that Mautic requires the zip extension in PHP.

After installing ziparchive with PHP the upgrade worked fine.

@weismannweb weismannweb added the needs-triage For new issues/PRs that need to be triaged label Aug 16, 2020
@weismannweb weismannweb changed the title Install from 3.0.1 to 3.0.2 requires ziparchive, cant upgrade, maybe should output a compatibility message? Upgrade script from rom 3.0.1 to 3.0.2 requires ziparchive, cant upgrade, maybe should output a compatibility message? Aug 16, 2020
@RCheesley
Copy link
Member

Hi there @weismannweb and thanks for raising this issue!

We have an open issue in the documentation repo for the Education Team to list out the required extensions, and another issue for the product team to improve the installation/upgrade process to check for the required extensions.

As this isn't an issue per-say with Mautic, and it's being dealt with elsewhere, I'm going to close this issue down.

If you'd like to support either of those two initiatives please do jump in on the issue and say hello! It's definitely an area where we can do better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage For new issues/PRs that need to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants