Enabling GeoIP (PECL) via configuration

I’ve created a private Piwik RPM that includes my DB configuration and automatically gets installed on a new instance. As a part of the init script of each instance, the GeoIP PECL extension is also installed.
When I log into Piwik for the first time, GeoIP/PECL is marked as installed and available, but not as selected.
I don’t see anything in config/config.ini.php (before or after manually selecting GeoIP/PECL) that would suggest GeoIP/PECL is enabled.

Is there any way to make GeoIP/PECL the default via configuration files?

Is there any way to make GeoIP/PECL the default via configuration files?

Yes there is, unfortunately it’s not as simple as it should be :frowning: you need to create a PHP script that loads Piwik files using this technique: http://developer.piwik.org/guides/querying-the-reporting-api#call-the-piwik-api-in-php

then write the following code:


LocationProvider::setCurrentProvider(LocationProvider\GeoIp\Pecl::ID);

if you want an APi for this, please create feature request: https://github.com/piwik/piwik/issues/