Mautic Community Forums

Upgrade Issues for Security Release 3.2.3

Your software
My PHP version is : PHP 7.2.24
My MySQL/MariaDB version is (delete as applicable): mariadb Ver 15.1 Distrib 10.1.47-MariaD

Mautic 3.2.1

Updating/Installing Errors
I am (delete as applicable): Updating
Upgrading/installing via (delete as applicable) : Both

I began by trying to upgrade via the command line and was hit with this error:
Step 2 [–>-------------------------] Downloading update package… PHP Notice: Undefined index: message in /mautic/app/bundles/CoreBundle/Update/Step/InstallNewFilesStep.php on line 131

Via the dashboard Notification got the following error in mautic.error log file:
2021/01/14 15:55:21 [error] 827#827: *2343445 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file “/mautic/app/…/var/logs/mautic_prod-2021-01-14.php” could not be opened: failed to open stream: Permission denied in /mautic/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108

Stack trace:

#0 /mautic/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(119): Monolog\Handler\StreamHandler->write(Array)

#1 /mautic/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler->write(Array)

#2 /mautic/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle(Array)

#3 /mautic/vendor/monolog/monolog/src/Monolog/Logger.php(740): Monolog\Logger->addRecord(500, ‘Uncaught PHP Ex…’, Array)

#4 /mautic/vendor/symfony/http-kernel/EventListener/ExceptionListener.php(101): Monolog\Logger->critical(‘Uncaught PHP Ex…’, Array)

#5 /mautic/app/bundles/…

PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file “/mautic/app/…/var/logs/mautic_prod-2021-01-14.php” could not be opened: failed to open stream: Permission denied in /mautic/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108

Stack trace:

#0 /mautic/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(119): Monolog\Handler\StreamHandler->write(Array)

#1 /mautic/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler->write(Array)

#2 /mautic/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle(Array)

#3 /mautic/vendor/monolog/monolog/src/Monolog/Logger.php(614): Monolog\Logger->addRecord(400, ‘PHP Error: Unca…’, Array)

#4 /mautic/app/bundles/CoreBundle/ErrorHandler/ErrorHandler.php(424): Monolog\Logger->log(400, 'P

I tried to chown the entire Mautic directory and still getting the error. Not sure if I should go and change file permissions…

1 Like

We have also got a report of this on Github :

Linking for completeness.

1 Like

I reran chown then ran the update from Notifications and everything worked fine.

This is a bug we accidentally introduced in version 3.2.0 and only applies to CLI updates. The fix is simple; we’ll be releasing an updated version within the next 30 mins :+1:t3:

2 Likes

As promised, we released a new version yesterday: Release Mautic Community 3.2.4 · mautic/mautic · GitHub

Versions 3.2.4 and higher aren’t affected by this bug. But if you’re currently running a version between 3.2.0 and 3.2.3, then you can apply this workaround to get to 3.2.4 (make sure to cd into your Mautic folder first, e.g. /var/www/html):

wget https://github.com/mautic/mautic/releases/download/3.2.4/3.2.4-update.zip
php bin/console mautic:update:apply --update-package=3.2.4-update.zip
php bin/console mautic:update:apply --finish

Hey @dennisameling

Thanks for the instructions. I have done this on a handful of servers now and for me at the end I keep getting errors.

I delete cache - but still does not work until I chown the entire Mautic directory (maybe there is a permission problem along the way with the patch ?)

I have everything working, but if anyone runs into similar problems this is how I overcame it.

1 Like