New install - Broken PECL - Error message

There is an error. Please report the message (Piwik 1.9.1) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Notice: geoip_country_code_by_name() [function.geoip-country-code-by-name]: Host 194.57.91.215 not found in /home2/bronxesc/public_html/analytics/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php on line 80

Backtrace -->

#0 Piwik_ErrorHandler(…) called at [:]
#1 geoip_country_code_by_name(…) called at [/home2/bronxesc/public_html/analytics/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php:80]
#2 Piwik_UserCountry_LocationProvider_GeoIp_Pecl->getLocation(…) called at [/home2/bronxesc/public_html/analytics/plugins/UserCountry/LocationProvider/GeoIp.php:83]
#3 Piwik_UserCountry_LocationProvider_GeoIp->isWorking(…) called at [/home2/bronxesc/public_html/analytics/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php:153]
#4 Piwik_UserCountry_LocationProvider_GeoIp_Pecl->isWorking(…) called at [/home2/bronxesc/public_html/analytics/plugins/UserCountry/LocationProvider.php:222]
#5 Piwik_UserCountry_LocationProvider::getAllProviderInfo(…) called at [/home2/bronxesc/public_html/analytics/plugins/UserCountry/Controller.php:40]
#6 Piwik_UserCountry_Controller->adminIndex(…) called at [:]
#7 call_user_func_array(…) called at [/home2/bronxesc/public_html/analytics/core/FrontController.php:138]
#8 Piwik_FrontController->dispatch(…) called at [/home2/bronxesc/public_html/analytics/index.php:53]

geoip support enabled
geoip extension version 1.0.8
geoip library version 1004005

Directive Local Value Master Value
geoip.custom_directory /usr/share/GeoIP/ /usr/share/GeoIP/

I have GeoIPCity.dat in the /usr/share/GeoIP/ directory

Info for ip address beside GeoIP (PECL) (broken) says:

Error: Piwik tried checking the location of a known IP address (194.57.91.215), but your server returned ‘Unknown, Unknown, Unknown’. If this provider were configured correctly, it would return ‘Besançon, A6, FR’.

Can anyone help me understand what might be going on here?

Thanks!

Hi fxr,

If you’ve got the GeoIP city database then geoip_country_code_by_name should never get called… Can you tell me what the output of the following php code is (when run through the browser or php-cgi):

<?php echo (int)geoip_db_avail(GEOIP_CITY_EDITION_REV0)."\n"; echo (int)geoip_db_avail(GEOIP_CITY_EDITION_REV1)."\n"; echo (int)geoip_db_avail(GEOIP_REGION_EDITION_REV0)."\n"; echo (int)geoip_db_avail(GEOIP_REGION_EDITION_REV1)."\n"; echo (int)geoip_db_avail(GEOIP_COUNTRY_EDITION)."\n"; echo geoip_db_filename(GEOIP_COUNTRY_EDITION)."\n"; echo geoip_db_filename(GEOIP_CITY_EDITION_REV0)."\n";

The php.ini module plugin location is pointing incorrectly can you copy the content of the geoip plugin and how you had it installed in the php.ini?

remeber you need to point the absolute path of where the /your server path/piwik/misc folder is located.

once updated then restart the apache server and try the geolocation settings in piwik.