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

[Bug] Update to 5.1.2 causes console error, requires config.ini.php to be writeable #22633

Open
4 tasks done
mikkeschiren opened this issue Oct 1, 2024 · 3 comments
Open
4 tasks done
Labels
Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member

Comments

@mikkeschiren
Copy link
Contributor

What happened?

Starting the database upgrade process now. This may take a while, so please be patient.

    *** Update ***

    Database Upgrade Required

    Your Matomo database is out-of-date, and must be upgraded before you can continue.

    Matomo database will be upgraded from version 5.1.1 to the new version 5.1.2.

    The database upgrade process may take a while, so please be patient.

  Executing ./console config:set --section="database" --key="collation" --value="utf8mb3_general_ci"...
    [X] Critical Error during the update process:

    * /var/www/html/core/Updates/5.1.2-rc1.php:
    Error trying to execute the migration './console config:set --section="database" --key="collation" --value="utf8mb3_general_ci"'.
    The error was: The Matomo configuration file (config/config.ini.php) is not writable, some of your changes might not be saved.  Please change permissions of the config file to make it writable.

    The above is the core error message. It should help explain the cause, but if you require further help please:

    * Check the [ Matomo FAQ ] which explains most common errors during update.
    * Ask your system administrator - they may be able to help you with the error which is most likely related to your server or MySQL setup.

    If you are an advanced user and encounter an error in the database upgrade:

    * identify and correct the source of the problem (e.g., memory_limit or max_execution_time)
    * execute the remaining queries in the update that failed
    * manually update the `option` table in your Matomo database, setting the value of version_core to the version of the failed update
    * re-run the updater (through the browser or command-line) to continue with the remaining updates
    * report the problem (and solution) so that Matomo can be improved
ERROR     [2024-10-01 08:54:56] 1  Uncaught exception: /var/www/html/plugins/CoreUpdater/Commands/Update.php(267): Matomo could not be updated! See above for more information. [Query: , CLI mode: 1]

In Update.php line 267:

  Matomo could not be updated! See above for more information.


core:update [--yes] [--skip-cache-clear]

What should happen?

It should be possible to run core update, without writing to config.ini.php

How can this be reproduced?

Make config.ini.php not writeable. Make sure you are running 5.1.1. Update to 5.1.2

Matomo version

5.1.2

PHP version

8.1.30

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

@mikkeschiren mikkeschiren added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Oct 1, 2024
@mikkeschiren
Copy link
Contributor Author

Also - I can see that the core update file was named 5.1.2-rc1.php in 5.1.2, and that it has been renamed to 5.2.0-b2.php. I am not sure why this has been done.

@mikkeschiren
Copy link
Contributor Author

the issue itself could be eeasily solved by setting the config in before updating, and keeping the write protection, but would like to know the need to have it writeable in the first place.

@mikkeschiren
Copy link
Contributor Author

Also see #22634.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member
Projects
None yet
Development

No branches or pull requests

1 participant