Ip2location not working after update to v3.1.10

Hi

After update to v3.1.10 the plugin “ip2location” no longer works.

I’m getting following error:

[28-May-2019 05:52:34 UTC] PHP Fatal error: Uncaught Error: Class ‘IP2Location\Database’ not found in […]/plugins/IP2Location/LocationProvider/IP2Location.php:86
Stack trace:
#0 […]/plugins/UserCountry/VisitorGeolocator.php(145): Piwik\Plugins\IP2Location\LocationProvider\IP2Location->getLocation(Array)
#1 […]/plugins/UserCountry/VisitorGeolocator.php(115): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocationObject(Object(Piwik\Plugins\IP2Location\LocationProvider\IP2Location), Array)
#2 […]/plugins/UserCountry/Columns/Base.php(50): Piwik\Plugins\UserCountry\VisitorGeolocator->getLocation(Array, true)
#3 […]/plugins/UserCountry/Columns/City.php(43): Piwik\Plugins\UserCountry\Columns\Base->getLocationDetail(Array, ‘city_name’)
#4 […]/core/Tracker/Visit.php(460): Piwik\Plugins\UserCountry\Columns\City->onNewVisit(Object(Piwik\Tracker\Request), Object in […]/plugins/IP2Location/LocationProvider/IP2Location.php on line 86

When i click on “ip2location” in the matomo-settings, i’m getting following error/report:

A fatal error occurred

The following error just broke Matomo (v3.9.1):

Class ‘IP2Location\Database’ not found
in […]/plugins/IP2Location/API.php line 56
Troubleshooting

Follow these steps to solve the issue or report it to the team:
If you have just updated Matomo to the latest version, please try to restart your web server. This will clear the PHP opcache which may solve the problem.
If this is the first time you see this error, please try refresh the page.
If this error continues to happen, we appreciate if you send the error report to the Matomo team.

Does someone have the same issue?

Best regards
maisen20

Sounds to me like some plugin file is missing? Maybe reinstall the plugin?

Was the first thing i did. Deactivated & uninstalled the plugin, but after reinstall i get the same errors.

I do fear, that no one here can help you directly as this is a third-party plugin. You might be able to get get help there: GitHub - ip2location/ip2location-piwik: Use IP2Location geolocation database to lookup for accurate visitor location in Matomo (Piwik) 2.0. It enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation and usage type that any IP address or hostname originates from.

Okay thank you!
I created a issue:

Github.com - ip2location-piwik

And it seems like the ip2location team has fixed the issue:

and released 3.1.11

The following error just broke Matomo (v3.9.1):

syntax error, unexpected ‘=’
in /data/web/virtuals/139862/virtual/www/piwik/plugins/IP2Location/lib/IP2Location.php line 890

version 3.1.11 did not fix the error

Hi,

It seems like the Ip2Location team has introduced a syntax that is only available since PHP 7.1. I’ll report it to them:

Done in

@Paul_Dvorak, I’d recommend you to upgrade PHP soon as PHP<7.1 isn’t supported by the PHP team any more and Matomo 4 will drop support for those version.

Hello I get this warning when I go to System\IP2Location page in Matomo

WARNING: C:\WebApps\Matomo\plugins\IP2Location\LocationProvider\IP2Location.php(94): Notice - Trying to access array offset on value of type bool - Matomo 3.13.2 -
Using php 7.4.1

@Paulina_Quintero

The IP2Location plugin is maintained by the IP2Location team, so you should rather report the bug to them:

Thank you, I will.

Paulina