mod_geoip was not detected, but is installed - Piwik 1.9

Hello,

I updated to Piwik 1.9 successfully without any errors.
Now I wanted to enable GeoIP and installed successfully the package libapache2-mod-geoip, configured it like in the FAQ (How to - Analytics Platform - Matomo) and restarted Apache. In phpinfo() is the GeoIP module successfully loaded.
But if I open the Geolocation tab there is written:
GeoIP (HTTP Server Module) - Not installed

It seems to be a bug? How could I enable it?

Did you download and install the relevant datafiles from Maxmind?

Same problem here…

This is odd… The tab should say ‘GeoIP (Apache)’ not ‘GeoIP (HTTP Server Module)’.

Can you tell me what the output of apache_get_modules() is?

Also, can you see if $_SERVER[‘GEOIP_ADDR’] and $_SERVER[‘GEOIP_COUNTRY_CODE’] are set?

No, I don’t want to use such a commercial service.

That’s NULL as ouput.

Output:


[GEOIP_COUNTRY_CODE] => DE
 [GEOIP_COUNTRY_NAME] => Germany

Try replacing plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php with this file http://dev.piwik.org/trac/browser/trunk/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php?format=txt

Are things working now?

[quote=capedfuzz]
Try replacing plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php with this file http://dev.piwik.org/trac/browser/trunk/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php?format=txt

Are things working now?[/quote]

Not working - but GeoIP (HTTP Server Module) says “broken” now instead of “not installed”…
any further ideas?

Sorry, my change was incomplete. This updated script should work: http://dev.piwik.org/trac/browser/trunk/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php?format=txt

Okay this shows now in green text color under “GeoIP (HTTP Server Module)”: Installed

But If I hit the link in the yellow box ("According to this provider, your current location is: ") besides this I get just:

Germany
Refresh

Maybe only the country db is installed / configured?

We will show in a next version which DB is currently found (city or country) to help troubleshoot such issues, see ticket: Improve GeoIP diagnostics · Issue #3458 · matomo-org/matomo · GitHub