Need advice IPV6 support with GEOIP Php or PECL


#1

Hi,

Things seems to work error free with the GeoCityLite database using the , renamed to GeoCity (although, using IPV6 I´m either unknown with the PECL method or in Hong Kong China with the php method).

Attempting to install any of the IPV6 databases (City and Country) results in an error. (The method I used was to just wget the tarball from maxmind and rename it

After pressing update, it just says loading … forever, entering the page again results in an error.

(Although my tracking works with the default option, I would like to experiment with log-analysis for fun).

[i]WARNING: Found unrecognized database type: 30

WARNING: /usr/share/nginx/html/piwik/libs/MaxMindGeoIP/geoip.inc(1690): Notice - Undefined offset: -11740608 - Piwik 2.14.3 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)[/i]

Please advice.

Regards,

Tov Are
https://tovare.com/piwik/


(Matthieu Aubry) #2

Hi there,

can you show a screenshot of your Admin> Geolocation page, showing the URL you put as geoip URLs?


#3
  1. The ‘geoip.custom_directory’ PHP ini option is set to ‘/usr/share/nginx/html/piwik/misc/’.

  2. Currently in the Location Database field:
    http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

Note I tried something else after reading a 3 yr. old commit to piwik (https://dev.piwik.org/trac/attachment/ticket/3581/piwik-geoip-ipv6.patch), my misc directory now contains:


rw-r--r-- 1 www-data root       779416 Aug  5 04:35 GeoIP.dat
-rw-r--r-- 1 www-data www-data 15418580 Aug  9 15:06 GeoIPCity.dat
-rw-r--r-- 1 www-data root     16097571 Aug  9 14:46 GeoIPCityv6.dat
-rw-r--r-- 1 www-data root      1454345 Aug  5 04:35 GeoIPv6.dat

I don´t get any crashes now, but the code doesn´t identify my country.

Here´s a screen capture of my settings:
Link to screenshot of the settings


(Matthieu Aubry) #4

in the “Locatoin database” field it looks like there is an extra ": " at the start of the URL. can you try set there the correct URL?


#5

Done that.

When accessing my Piwik server directly using IPV4 it works, and the PECL reports:


(59.917, 10.75)
Oslo, 12
0001
Norge

Org: Ukjent
ISP: Ukjent

But it only shows that lookup in the IPv4 file works, not the IPv6 that I´m trying to get working.

My setup is that I have a front-end server set up with IPV6 and IPV4 complete with an AAAA record in DNS. This server uses Ngnix as a proxy for my Piwik server so that requests to /piwik/ are forwareded. My piwik server doesn´t have an IPV6 interface enabled. Is there some php-code in piwik that requires a public IPv6 network enabled on the server it´s running on ?