MAUTIC update error

Your software
My PHP version is : 7.4.30
My MySQL/MariaDB version is 10.3.34: MySQL/MariaDB version

Updating/Installing Errors
I am trying to Updating
Upgrading via : Web and Command Line

These errors are showing in the installer : via Web the upgrade stop to “Clearing Application Cache”
Instead, via the Command line, it stops after it asks me to write " php bin/console mautic:update:apply --finish " and the issue I have is under the Database update.

These errors are showing in the Mautic log : I don’t know because I restore the backup.

Your problem
My problem is : That I have 403 error if I try to open the Mautic installation, and the installation doesn’t finish correclty.

Steps I have tried to fix the problem : no one

Hi

From which version of Mautic to which other version of Mautic do you upgrade?

It is not the same to update to 4.40 from a 3.x than from a 4.x for example.

Regards!

Hi,
I’m trying to update from 4.1.0 to 4.4.0

Hi,

I understand that the update process you perform via SSH is first an update:find and then an update:apply, correct?

sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:find

and then

sudo -u www-data php /var/www/html/mautic/bin/console mautic:update:apply

Regards!

Hi,
Thank you for your reply.
Sorry, but I don’t have understood…
My Mautic URL is https://marketing.inonda.tv/
When I installed it with Installatron from cPanel, it need to be installed into a subfolder. After the installation, I migrated it to the main folder.
Could be this the reason for the update issue?

To do the update from the Command Line I have followed this guide, using the cPanel Terminal, Updating at command line | Mautic.
Can I use the command strings you have written before in the cPanel Terminal?

How many PHP resources (for example memory limit and max_execution_time) do I need to set for the update and to use MAUTIC without problems?

Thank you

How did you install it for first time?

Did you use install it using an app called “Softaculous” in cPanel, or download / installed from zip, or use composer install via terminal?

I have installed it using “Installatron” in cPanel, similar to “Softaculous”.

It probably will need to be updated via Installatron.

On Installatron site, Mautic package shown to be updated to 4.4.0
https://installatron.com/apps?s=fb00d111940ca6f77a69d2ca2e8dfb1b&q=mautic

However, Mautic is ending the zip installation soon and from 5.0+ onward it will be composer installed. I don’t know if Installatron or Softaculous will continue to offer Mautic as a package since not all host offer terminal access to their clients.

You might want to prepare about switching over to composer installed Mautic soon or at least read up about it.

Ok, but from the 3.3.1 version, I have updated Mautic via Web from the notification message system.
I will try to update using your string from the cPanel Terminal

Now, cPanel shows me that the Mautic version installed is 3.3.1 without any update messages, but if I enter into Mautic I can see that the installed version is 4.1.0.
I think because I have moved Mautic from the subfolder to the main folder.
Well, I cannot update from Installatron.

Terminal in cPanel return me a message “bash: sudo: command not found”

That because your mautic path isn’t the standard default path.

Let me be sure I understood this correctly.

You first installed Mautic v3 using cPanel Installatron then moved the Mautic installation to a different folder (from sub-folder to root folder?) then upgrade it later to 4+ using the Mautic web updater from notification center?

yeah, I doubt that you will be able to update it with cPanel Installatron anymore since you have move it to a new location and use the Mautic updater to v4+

If it was me … again that is ME … I would probably backup everything including export backup database to SQL and then zip up the root folder to same a copy.

Then empty out the root folder and grab a composer.json to edit the path to fit your cPanel folder structure and do a brand new install from composer. Import the database back in the new installation database also if you have done theme etc then you would need to restore those themes from backup as well too.

Mautic does not offer support on shared hostings but I have successfully run composer installed Mautic on cPanel and other shared hosting with modified composer.json.

If you are good with backup and want to give this a try. I can probably help you modify your composer.json to give it a shot and see how it works out for you.

1 Like

YES

I have done a database zip backup.
But, I don’t know where I can find and edit the composer.json file…

I take no responsibility for this. I do plan on releasing a guide on installing composer Mautic on shared host but I am still testing it and waiting for some of the reported bugs to be fixed before writing the guide.

However, here a run down to get composer installed Mautic on cPanel.

  1. Go to your cPanel built in terminal
  2. Type this command$: composer --version
    (need to be at least version 2 or higher)
  3. CD to your /public_html/ folder
  4. Type this command$: composer create-project mautic/recommended-project:^4.0 --no-interaction --no-install
  5. A new folder /recommended-project/ will be created in /public_html/. Go to that folder and grab the file “composer.json” to move it to the /public_html/ folder. After moving composer.json file, you can delete the /recommended-project/ folder
  6. Edit the composer.json file with your favorite editor.

You will need to change some paths in the composer.json file for cPanel file structure and use absolute file pathname in it. On mine, I had to change few lines between line 90 to 112 or so. cPanel web-root path usually being with /home then /your username here/ and ends with /public_html

Basically, you are renaming all the “docroot” in composer.json to “/home/username/public_html”. It’‘’ be easier to do a search and replace all from docroot → /home/username/public_html

It will end up looking like this below


"autoload": {
    "psr-4": {
      "MauticPlugin\\": "/home/username/public_html/plugins/"
    }
  },
  "extra": {
    "mautic-scaffold": {
      "locations": {
        "web-root": "/home/username/public_html/"
      }
    },
    "installer-paths": {
      "/home/username/public_html/app": [
        "type:mautic-core"
      ],
      "/home/username/public_html/plugins/{$name}": [
        "type:mautic-plugin"
      ],
      "/home/username/public_html/themes/{$name}": [
        "type:mautic-theme"
      ]
    },
  1. Save composer.json (it still should be in your /public_html/ folder and your prompt in terminal is in that directory)
  2. Type this command$: composer install --no-interaction

Go to your home URL and complete Mautic installation from there. It will be a brand new install so you will need to restore your database from backup, your local.php and all your themes.

You will probably have to edit the local.php and fix all the file path in it as well too.

Do this at your own risk.

2 Likes

Hi, sorry for the delay in the reply…

Well, I have created the composer.json file using your guide but when I arrive at point 7 the system return me these errors:

[username@cloudhosting18 marketing.inonda.tv]$ composer --version
Composer version 2.2.12 2022-04-13 16:42:25
[username@cloudhosting18 marketing.inonda.tv]$ composer install --no-interaction
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See Basic usage - Composer for more information.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires mautic/core-composer-scaffold 4.x-dev → satisfiable by mautic/core-composer-scaffold[4.x-dev].
- mautic/core-composer-scaffold 4.x-dev requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 2
- Root composer.json requires mautic/core-project-message 4.x-dev → satisfiable by mautic/core-project-message[4.x-dev].
- mautic/core-project-message 4.x-dev requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 3
- Root composer.json requires mautic/core-lib 4.4.5 → satisfiable by mautic/core-lib[4.4.5].
- mautic/core-lib 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 4
- Root composer.json requires mautic/grapes-js-builder-bundle 4.4.5 → satisfiable by mautic/grapes-js-builder-bundle[4.4.5].
- mautic/grapes-js-builder-bundle 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 5
- Root composer.json requires mautic/plugin-citrix 4.4.5 → satisfiable by mautic/plugin-citrix[4.4.5].
- mautic/plugin-citrix 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 6
- Root composer.json requires mautic/plugin-clearbit 4.4.5 → satisfiable by mautic/plugin-clearbit[4.4.5].
- mautic/plugin-clearbit 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 7
- Root composer.json requires mautic/plugin-cloudstorage 4.4.5 → satisfiable by mautic/plugin-cloudstorage[4.4.5].
- mautic/plugin-cloudstorage 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 8
- Root composer.json requires mautic/plugin-crm 4.4.5 → satisfiable by mautic/plugin-crm[4.4.5].
- mautic/plugin-crm 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 9
- Root composer.json requires mautic/plugin-emailmarketing 4.4.5 → satisfiable by mautic/plugin-emailmarketing[4.4.5].
- mautic/plugin-emailmarketing 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 10
- Root composer.json requires mautic/plugin-focus 4.4.5 → satisfiable by mautic/plugin-focus[4.4.5].
- mautic/plugin-focus 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 11
- Root composer.json requires mautic/plugin-fullcontact 4.4.5 → satisfiable by mautic/plugin-fullcontact[4.4.5].
- mautic/plugin-fullcontact 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 12
- Root composer.json requires mautic/plugin-gmail 4.4.5 → satisfiable by mautic/plugin-gmail[4.4.5].
- mautic/plugin-gmail 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 13
- Root composer.json requires mautic/plugin-outlook 4.4.5 → satisfiable by mautic/plugin-outlook[4.4.5].
- mautic/plugin-outlook 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 14
- Root composer.json requires mautic/plugin-social 4.4.5 → satisfiable by mautic/plugin-social[4.4.5].
- mautic/plugin-social 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 15
- Root composer.json requires mautic/plugin-tagmanager 4.4.5 → satisfiable by mautic/plugin-tagmanager[4.4.5].
- mautic/plugin-tagmanager 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 16
- Root composer.json requires mautic/plugin-zapier 4.4.5 → satisfiable by mautic/plugin-zapier[4.4.5].
- mautic/plugin-zapier 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 17
- Root composer.json requires mautic/theme-aurora 4.4.5 → satisfiable by mautic/theme-aurora[4.4.5].
- mautic/theme-aurora 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 18
- Root composer.json requires mautic/theme-blank 4.4.5 → satisfiable by mautic/theme-blank[4.4.5].
- mautic/theme-blank 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 19
- Root composer.json requires mautic/theme-brienz 4.4.5 → satisfiable by mautic/theme-brienz[4.4.5].
- mautic/theme-brienz 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 20
- Root composer.json requires mautic/theme-cards 4.4.5 → satisfiable by mautic/theme-cards[4.4.5].
- mautic/theme-cards 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 21
- Root composer.json requires mautic/theme-coffee 4.4.5 → satisfiable by mautic/theme-coffee[4.4.5].
- mautic/theme-coffee 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 22
- Root composer.json requires mautic/theme-confirmme 4.4.5 → satisfiable by mautic/theme-confirmme[4.4.5].
- mautic/theme-confirmme 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 23
- Root composer.json requires mautic/theme-fresh-center 4.4.5 → satisfiable by mautic/theme-fresh-center[4.4.5].
- mautic/theme-fresh-center 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 24
- Root composer.json requires mautic/theme-fresh-fixed 4.4.5 → satisfiable by mautic/theme-fresh-fixed[4.4.5].
- mautic/theme-fresh-fixed 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 25
- Root composer.json requires mautic/theme-fresh-left 4.4.5 → satisfiable by mautic/theme-fresh-left[4.4.5].
- mautic/theme-fresh-left 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 26
- Root composer.json requires mautic/theme-fresh-wide 4.4.5 → satisfiable by mautic/theme-fresh-wide[4.4.5].
- mautic/theme-fresh-wide 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 27
- Root composer.json requires mautic/theme-goldstar 4.4.5 → satisfiable by mautic/theme-goldstar[4.4.5].
- mautic/theme-goldstar 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 28
- Root composer.json requires mautic/theme-mauve 4.4.5 → satisfiable by mautic/theme-mauve[4.4.5].
- mautic/theme-mauve 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 29
- Root composer.json requires mautic/theme-nature 4.4.5 → satisfiable by mautic/theme-nature[4.4.5].
- mautic/theme-nature 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 30
- Root composer.json requires mautic/theme-neopolitan 4.4.5 → satisfiable by mautic/theme-neopolitan[4.4.5].
- mautic/theme-neopolitan 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 31
- Root composer.json requires mautic/theme-oxygen 4.4.5 → satisfiable by mautic/theme-oxygen[4.4.5].
- mautic/theme-oxygen 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 32
- Root composer.json requires mautic/theme-paprika 4.4.5 → satisfiable by mautic/theme-paprika[4.4.5].
- mautic/theme-paprika 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 33
- Root composer.json requires mautic/theme-skyline 4.4.5 → satisfiable by mautic/theme-skyline[4.4.5].
- mautic/theme-skyline 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 34
- Root composer.json requires mautic/theme-sparse 4.4.5 → satisfiable by mautic/theme-sparse[4.4.5].
- mautic/theme-sparse 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 35
- Root composer.json requires mautic/theme-sunday 4.4.5 → satisfiable by mautic/theme-sunday[4.4.5].
- mautic/theme-sunday 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 36
- Root composer.json requires mautic/theme-vibrant 4.4.5 → satisfiable by mautic/theme-vibrant[4.4.5].
- mautic/theme-vibrant 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.
Problem 37
- Root composer.json requires mautic/theme-trulypersonal 4.4.5 → satisfiable by mautic/theme-trulypersonal[4.4.5].
- mautic/theme-trulypersonal 4.4.5 requires php >=7.4.0 <8.1 → your php version (8.1.13) does not satisfy that requirement.

But the PHP version I have set is 7.4 for the marketing.inonda.tv folder…

I would grab the 4.4.+ on github and uncompress it on your server then try composer again to see if it stop those error message. There an issue with 4.+ composer that not installing all the necessary files from the repo.

Or just use github to install Mautic 4.+ and wait for 5.0 to try composer again.

1 Like

But the issue I have is only when MAUTIC starts to update the database, the files of the new version are downloaded and installed… Someone has the issue?

You need to downgrade your PHP version. Your error messages say ‘your php version (8.1.13) does not satisfy that requirement.’

You need to use PHP 7.4 or PHP 8.0

Mautic does not support php 8.1 yet.

2 Likes

Ok, But the update went wrong with PHP 7.4 too… But only the update of the database.
I’m waiting for Mautic 5…