Apply accurate geolocation to old visits bug

Hello everyone,

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.

Hi demlasjr,

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.

Also, I’ve updated the script to give better error reporting, you can get the latest version here: .

If you replace the old version w/ this one and run it, it will tell you what’s wrong.

Let me know if this helps!

New version of the file is at:

Hi capedfuzz and matt !

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 it should run as well. However, it might get terminated if it takes too long.