How do I install GeoIP (Php)?


#1

I followed the link from the Settings --> Geolocation --> How do I get the GeoIP databases and it brought me here GeoIP2 City Database | MaxMind where I purchased the GeoIP2 City database. It arrived a few hours later in the .mmdb format.

I checked the FAQ, forums, user documentation and cant find an installation guide. I find tons of support for PECL, but none for the PHP version. I tried dropping it in the /piwik/misc folder like the instructions for the free GeoLiteCity.dat version say to do, refreshed the page, but the location provider for GeoIP (Php) is still greyed out.

Can anyone provide instructions for installing the GeoIP2 City DB (PHP)?
(maxmind doesnt provide instructions on their site or install notes with the db).

thanks all


(Matthieu Aubry) #2

Hi there,

unfortunately the DB compatible with Piwik is geolite not geoip2 - we do not yet support it see Make geoip backend work with geoip2 · Issue #4487 · matomo-org/piwik · GitHub
feel free to comment on this issue


(Matthieu Napoli) #3

It seems you downloaded GeoIP2, but this new version is not supported in Piwik yet: Make geoip backend work with geoip2 · Issue #4487 · matomo-org/piwik · GitHub

Just as a side not, this FAQ explains how to install the database: How do I get the GeoIP databases to improve accuracy of Country detection, and detect visitors’ Cities and Regions? - Analytics Platform - Matomo But you’ll probably need the v1 of GeoIP database.


#4

Thank you both for your responses. I will try the GeoIP version.

Just as as FYI- the FAQ section does not contain instructions on how to install the purchased GeoIP PHP database- only the free version and PECL.


(Matthieu Aubry) #5

Just as as FYI- the FAQ section does not contain instructions on how to install the purchased GeoIP PHP database- only the free version and PECL.

Ok we could make this more clear but instructions are the same for Free and Paid databases.