GeoIP (PECL) installed correctly but can't switch to City database


(phil salt) #1

Hi,

PECL installed successfully

.user.ini setting geoip.custom_directory = /srv/users/user/apps/wordpress/public/piwik/misc/

GeoIPCity database file included in /srv/users/user/apps/wordpress/public/piwik/misc/GeoIPCity.dat

php5.6 access log shows the following on clicking refresh:

[23/Dec/2015:00:29:38 +0000] “POST /piwik/index.php?date=yesterday&module=UserCountry&action=getLocationUsingProvider&id=geoip_pecl&idSite=1&period=day” 200 43 - 13864 14252 0.127 4718592 63.04% 23.64% “/piwik/index.php?date=yesterday&module=UserCountry&action=getLocationUsingProvider&id=geoip_pecl&idSite=1&period=day”

Is there one settings that’s been forgotten?

Thanks in advance,
Phil


(phil salt) #2

It appears that .user.ini is not directing to piwik/misc directory where GeoIPCity.dat is. By transferring GeoIPCITY.dat file into /usr/share/GeoIP (set up byPECL) problem disappears.


(phil salt) #3

All good now.

The final step forgotten - updating geoip.ini

  1. For me, went to /etc/php/conf.d

  2. Open geoip.ini

  3. Insert geoip.custom_directory=/piwik/misc after extension=geoip.so

    extension=geoip.so
    geoip.custom_directory=/piwik/misc

  4. Restart php