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

Fatal error in Matomo 4.1.1 when upgrading from latest 3.x Version with old maxminddb PHP-Ext #17154

Closed
futureweb opened this issue Jan 27, 2021 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@futureweb
Copy link
Contributor

futureweb commented Jan 27, 2021

Hello,

Matomo 3.x is working fine with PHP-Ext
maxminddb extension version 1.4.1 & libmaxminddb library version 1.3.2

But Matomo 4.1.1 will throw a Fatal Error with this Version if updated from 3.x ... (Error seen on SystemCheckPage)
Call to undefined method MaxMind\Db\Reader::getWithPrefixLen() in /var/www/piwik/vendor/geoip2/geoip2/src/Database/Reader.php 232 using PHP 7.3.21

You should add a check to Update Script if maxminddb PHP-Ext / libmaxminddb Lib Version is sufficient to run Matomo 4.x instead throwing a Fatal Error after Update! ;-)
(or fall back to slower PHP implementation if PHP-Ext not working / too low Version)

Working with Matomo 3.x but throwing Fatal Error on Matomo 4.x:

maxminddb
MaxMind DB Reader 	enabled 
maxminddb extension version 	1.4.1 
libmaxminddb library version 	1.3.2 

Woking with Matomo 4.x:

maxminddb
MaxMind DB Reader 	enabled 
maxminddb extension version 	1.9.0 
libmaxminddb library version 	1.5.0 

bye from snowy Austria
Andreas Schnederle-Wagner

ps) getWithPrefixLen() was added in Version 1.5.0 of MaxMind-DB-Reader-php (https://github.com/maxmind/MaxMind-DB-Reader-php/releases/tag/v1.5.0)

@tsteur
Copy link
Member

tsteur commented Jan 27, 2021

Hi @futureweb have a look at this FAQ which should help: https://matomo.org/faq/troubleshooting/how-do-i-fix-the-error-call-to-undefined-method-maxminddbreadergetwithprefixlen/ Let us know if that's not the case and we'll be happy to follow up. Thanks

@tsteur tsteur closed this as completed Jan 27, 2021
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Jan 27, 2021
@futureweb
Copy link
Contributor Author

futureweb commented Jan 27, 2021

Hey @tsteur,
thx, I already figured the Problem out and updated maxmind PHP-Ext a few days ago when I updated ... :-)

What I'm suggesting is adding a check on 3.x -> 4.x Update if the maxmind PHP-Ext Version is high enough that it supports the getWithPrefixLen() Function (Version >= 1.5.0)
As Matomo 3.x is working with Versions < 1.5.0 but 4.x will throw the Error after Update with this Version ... which is very irritating being faced with a Fatal Error right after an update of a working Matomo Instance ... ;-)

Andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants