You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
I never posted here before and not sure if you are aware of the issue or not.
There is a bug with GeoIP logging php errors when it encounters an unknown IP address i.e. one not in the database.
The error message is:
[client xx.x.xx.xx PHP Notice: geoip_country_code_by_name(): Host 46.6.81.70 not found in /var/www/piwik/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php on line 80, referer: http://XXXXX
Still testing error occurs as above trying line 80
From:
$result[self::COUNTRY_CODE_KEY] = geoip_country_code_by_name($ip);
To:
$result[self::COUNTRY_CODE_KEY] = @geoip_country_code_by_name($ip);
line 80
From:
$result[self::COUNTRY_CODE_KEY] = geoip_country_code_by_name($ip);
To:
$result[self::COUNTRY_CODE_KEY] = @geoip_country_code_by_name($ip);
Stops the error being logged, I should have read the error message first it even says line 80.
TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
Hi Guys,
I never posted here before and not sure if you are aware of the issue or not.
There is a bug with GeoIP logging php errors when it encounters an unknown IP address i.e. one not in the database.
The error message is:
[client xx.x.xx.xx PHP Notice: geoip_country_code_by_name(): Host 46.6.81.70 not found in /var/www/piwik/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php on line 80, referer: http://XXXXX
Solution:
/var/www/pistats/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
Line 57: $location = geoip_record_by_name($ip);
Change to:
$location = @geoip_record_by_name($ip);
The @ stops the error being logged.
Regards,
Leslie
Keywords: GeoIP logging php errors
The text was updated successfully, but these errors were encountered: