I have an issue when I’m trying to apply accurate geolocation to old visits.
php ./geoipUpdateRows.php
Fatal error: Call to a member function isWorking() on a non-object in /home/stats/public_html/misc/others/geoipUpdateRows.php on line 42
I have tried to commend those lines but unsuccessfully.
This is due to a configuration error. Make sure that in the Geolocation tab you’ve got either the “GeoIP (Php)” or “GeoIP (Pecl)” options installed and selected. And, if you’re using the PECL extension, make sure the command-line php.ini file loads the extension.
Thank you guys, this new file is working just fine. The weird part is that is showing me that PECL is not installed, even if it’s enabled on the server and in the piwik control panel I see it and it’s working fine there.
Is the PECL extension loaded by the command-line PHP? If not, the script won’t be able to use it.
I also modified the script so it’ll work in a browser, so if you login as the superuser and then go to http://yourpiwik.com/misc/others/geoipUpdateRows.php it should run as well. However, it might get terminated if it takes too long.