Piwik 2.0.2. does not recognize cities


#1

Hey there,

first of all: all my compliments to the developers of Piwik 2.0.2.
It is a huge step between this version and the one that has been used about an year ago.

However, heres my problem.

Although I have installed and activated GeoIP (PECL) and set up the database sync

URL http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Provider MaxMind
Database Cities

Piwik does not show up cities.

Is there any way to fix this?

Kind Regards from Germany,

Peter


(Matthieu Aubry) #2

Can you psot a screenshot of your Settings > Geo locate screen?


#3

Thank you!


#4

We have the same problem the geoip is not working

(apache 2.2 / php 5.5)


#5

can you check that the geo archive Dat is uncompressed?


#6

Hi,

yes we have unpack the file and rename to GeoIPCity.dat and move to /misc


#7

Bonjour,
Same problem, Piwik 2.0.2. does not recognize cities.

PHP 5.4, SQL 5.5, Apache 2.2.22 (Debian)
System verification : “No problem with your Piwik installation : Geolocalisation : OK”

Thank you


#8

any solution ?


(Matthieu Aubry) #9

Have you setup the Geo location, and the Cities database is downloaded ok? what is the size of the .dat file?


#10

i look on ssh with linux shell (ls -la)

17184375 Jan 8 18:00 GeoIPCity.dat


#11

Same problem here.

Downloaded the database from here: GeoLite2 Free Downloadable Databases « MaxMind Developer Site

Note that it is not a .dat file but a .mmdb file.

I renamed/moved it to misc/GeoIPCity.dat and after that I’ve got that error on top of my page: WARN UserCountry[2014-01-17 19:18:58] [5a7ad] Got GeoIP error when testing PHP GeoIP location provider: /var/www/piwik/libs/MaxMindGeoIP/geoip.inc(519): Undefined offset: -16776960

And in the UI I’ve got that message:

Erreur: Votre base de données GeoIP n’est pas au bon format. Elle peut être corrompue. Assurez-vous que vous utilisez la version binaire et tentez de la remplacer avec une autre copie.

There is the information about my uncompressed file:

-rw-r–r-- 1 www-data www-data 29553210 Jan 17 14:18 GeoLiteCity.dat


#12

Thanks to that ticket, I think I found my problem: Make geoip backend work with geoip2 · Issue #4487 · matomo-org/matomo · GitHub

I didn’t use the right DB.

It is working now if you download that DB: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

I don’t know if you can modify the link in Piwik admin panel but it would be nice since it’s a bit tricky to get the right DB…


#13

seems to be an european issue.

Any solution yet?


#14

@Simon Tremblay:
You’re downloading the wrong file from the wrong location.

This is the correct page: GeoLite Legacy Downloadable Databases « MaxMind Developer Site

Scroll down to the bottom of the page to get a list of the databases you can download. The one you want is “GeoLite City” in binary/gzip format.


#15

done. Still not working…


#16

Yes you are right. Thanks for the link. In the end I use the GeoIP PHP mofule not the PECL one…


#17

@Simon Tremblay
You forgot to set php.ini…

add in your php.ini file: (if ubuntu user : /etc/php5/conf.d/20-geoip.ini )

geoip.custom_directory=/path/to/piwik/misc
(replace /path/to/piwik with the path to your Piwik installation)

restart apache, and now PECL will work too…

et voilaaaa…