@futureweb opened this Issue on January 27th 2021 Contributor

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 commented on January 27th 2021 Member

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

@futureweb commented on January 27th 2021 Contributor

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

This Issue was closed on January 27th 2021
Powered by GitHub Issue Mirror