Command Line Upgrade Problem when upgrading from 2.16.3 to 3.0

Your software
My PHP version is : 7.2
*My MariaDB version is: 10.2

Updating/Installing Errors
*I am: Updating
*Upgrading: Command Line

These errors are showing in the installer :
No errors all looked good at this stage:
Welcome to Phase 2 of the Mautic 3 upgrade! We’ll continue where we left off.

Moving Mautic 2 files into mautic-2-backup and moving the Mautic 3 files in place, this might take a while… DO NOT ABORT THE SCRIPT!!!

Done!

Updating your config/local.php with new settings that were changed/introduced in Mautic 3…

Done! Your config file has been updated.

Getting the amount of available Mautic 3 database migrations… This might take a while!

Applying Mautic 3 database migrations, 9 migrations in total… This might take a while!

All Mautic 3 migrations applied successfully.

Restoring your user data like custom plugins/themes/media from the Mautic 2 installation. This might take a while… DO NOT ABORT THE SCRIPT!!!

Done! Your user data has been restored. Your Mautic 3 installation is ready. Just one more thing:

Cleaning up installation files that we no longer need…

Cleaned up successfully!

Building cache for Mautic 3…

Done! Cache has been built.

We’re done! Enjoy using Mautic 3 :slight_smile:

Don’t forget to update your cron jobs!

Do you want to remove the backup files? We recommend first checking in a browser whether Mautic 3 works as expected. Type “yes” to remove:

no

Ok, we won’t do anything for now. Please note that upgrade_v3.php will remain (publicly) available until you choose to remove the backup files using this script! Run this script again to be prompted to delete backup files.

These errors are showing in the Mautic log :

2020/07/24 13:29:41 [error] 30135#30135: *48256 FastCGI sent in stderr: “PHP message: RuntimeException: Unable to write in the “cache” directory (/var/www/mautic/app/…/var/cache/prod). - in file /var/www/mautic/vendor/symfony/http-kernel/Kernel.php - at line 768” while reading response header from upstream, client: ip.ip.ip.ip, server: mydomain.com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.2-fpm.sock:”, host: “mydomain.com

These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) :

None

Your problem
My problem is :

The above was my problem. When started looking at the files in the directory I noticed that everything was owned by root.
ran chown -R www-data:www-data * and fixed everything

Steps I have tried to fix the problem :

1 Like

Sounds like you’ve answered your own question. Is your install working now?

yip it is. and yes I did :slight_smile: took a while to get there though

That’s awesome news! :laughing:

I tried to upgrade my mautic version yesterday and during the last step I got an error that DB could not be upgraded. I am able to login and see everything but it not working. My forms stops working, any page with the /s/ url is broken. Any suggestion what I could run to resolve this problems?

Can you share from which version?

1 Like

this is the new v4.4.7

1 Like

Thank you. What is the version you upgrade from? I’ just asking because it is diffent if you upgrade from Mautic 2.16 or 3.3.3 or 4.4.6 :wink: