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

Make sure users with an older PHP can't upgrade to Matomo 4 #11068

Closed
nmstoker opened this issue Dec 22, 2016 · 9 comments
Closed

Make sure users with an older PHP can't upgrade to Matomo 4 #11068

nmstoker opened this issue Dec 22, 2016 · 9 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@nmstoker
Copy link

I logged in to the Piwik interface and saw the small message flagged up in the top right saying I should upgrade my 2.17 installation to 2.17.1. (I'm on PHP 5.4 so cannot go to 3.0.0 until the point at which we're able to move the installation to PHP 5.5+)

I clicked on teh message and then the automatic upgrade button (which has worked perfectly in the past) and then almost immediately got a message about an error due to the PHP version (see screenshot)
image

After digging into the files on the server, I discovered that the update has taken me to 3.0.0. Somehow it has been able to proceed with this bypassing the checks that it did previously and now leaving an unworkable system (until we can upgrade PHP).

I doubt many people will end up in this scenario, but it would be good to check that the version checking process works for any future cases where a higher specific version of PHP (or something else) is required and not necessarily available.

@tsteur
Copy link
Member

tsteur commented Dec 22, 2016

That's no good, sorry for that. Can you check what it says in "config/config.ini.php" for "release_channel = ..."? You may be able to downgrade manually see https://piwik.org/docs/update/#the-manual-three-step-update You can download 2.17.1 here http://builds.piwik.org/piwik-2.17.1.zip

@nmstoker
Copy link
Author

Hi Thomas,

Thanks for getting back to me. The config/config.ini.php file doesn't have any mention of "release_channel" at all, but seeing that the values there were able to override those in global.ini.php I checked in there and found it says this:

release_channel = "latest_stable"

image

I'm not going to have much of a chance to check details after today for about a week, so I'll need to leave it for now, but I'll gladly check anything useful later on. Given the somewhat restricted nature of my access on the installation, I think my best option is likely to be to prioritise the PHP upgrade if possible and push on rather than try rolling back.

@mattab
Copy link
Member

mattab commented Dec 26, 2016

to keep the code easier to understand, maybe we should remove the release_channel from the config file @tsteur ? maybe some code path is triggered using the config value instead of the recorded UI setting..

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Dec 26, 2016
@tsteur
Copy link
Member

tsteur commented Dec 27, 2016

I think it is only in the config but I haven't looked at the code.

@tsteur
Copy link
Member

tsteur commented Dec 27, 2016

Just because it is a UI setting doesn't mean it is stored in the DB just FYI

@lhilarides
Copy link

Just FYI: I ran into the exact same issue last week. Piwik asking me to upgrade to 2.17.1 and ending up with an unusable 3.0 install because it's still running on Ubuntu 12.04 and PHP 5.4. Our stats are not exactly mission critical, so for us the upgrade path (planned move to Debian 8) will be the solution

@mattab mattab added this to the 4.0.0 milestone Feb 18, 2017
@mattab
Copy link
Member

mattab commented Feb 18, 2017

We will need to solve this problem so it does not occur again in our next major release. Assigning to Piwik 4

@mattab mattab changed the title Upgrade from 2.17 that was meant to go to 2.17.1 took me to 3.0.0 Make sure users with an older PHP can't upgrade to Matomo 4 Jan 30, 2020
@tsteur
Copy link
Member

tsteur commented Apr 15, 2020

BTW I cannot reproduce this issue no matter the release channel. @mattab quite certain this issue can be closed. Eg used hard coded values to see what version it suggests

image

@tsteur
Copy link
Member

tsteur commented Apr 15, 2020

Created the referenced PR though for the API...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

4 participants