Empty GeoLocation Settings Page after uploading GeoIpCity.dat

Hi,

I installed the GeoIPCity.dat at path/to/piwik/misc/ like suggested but once that was done I reloaded the settings page but it only shows a blank page now.

/path/to/piwik/index.php?module=UserCountry&action=adminIndex&date=2012-10-18&period=day&idSite=5

What did I do wrong?

Thanks

Do you have any error iny our server error log file? Usually white page means error not logged on the screen.

Hi matt,

nope, the last error was from Oct 17th and it was a mysql error.

[17-Oct-2012 00:46:02 UTC] PHP Warning: mysqli_query() [function.mysqli-query]: Empty query in /path/to/piwik/core/Tracker/Db/Mysqli.php on line 130

If you rename the file to file to test.dat the page appears again ?

can you try download the file again, or try the country DB instead?

matt,

when I rename it to test.dat I am able to see the settings but can’t select the GeoIP (Php) option. It says it’s not installed.

I already tried to download the GeoIPCity.dat again and reuploaded. I had the same results.
BTW it is the GeoLiteCity.dat, I renamed it like it was suggested.

I just tried an older version I had from the GeoIP plugin.
I reloaded the settings page during upload. The settings page then recognized the GeoIPCity.dat was there but of course showed a message ‘broken GeoIPCity.dat’. After the file was fully uploaded I only got a blank page again.

I then tried the current country database. That one works but it only gives me the country. I’d really like to use the cities and regions.

Any idea?

A white screen really usually means an error is not logged. can you double check that your php.ini contains the error logging enabled ? Also, maybe you could try to do a fresh install of piwik a new directory and copy config/config.ini.php to it ?

Good news: GeoIP is now integrated in Piwik, enabling Accurate Visitors Geolocation in your Analytics reports. To enable GeoIP go to the Settings > Geolocation admin page, and follow the short instructions.

You can also get an even more accurate Country & City Database from here to enjoy top accuracy in detecting your visitors locations.

See also the documentation about Geolocation - Analytics Reports in Piwik.

[quote=matt]
Good news: GeoIP is now integrated in Piwik, enabling Accurate Visitors Geolocation in your Analytics reports. To enable GeoIP go to the Settings > Geolocation admin page, and follow the short instructions.

You can also get an even more accurate Country & City Database from here to enjoy top accuracy in detecting your visitors locations.

See also the documentation about Geolocation - Analytics Reports in Piwik.[/quote]

Hi matt,

thanks for that info. I followed the instructions and installed the GeoIP Database based on this Piwik info:

That is the database I am haveing trouble with. I also don’t want to buy the commercial database currently since the lite version is not even working. Do you have any further ideas on how to get rid of the blank screen? Any file, or different log I can look into?

Thanks

[quote=matt]
A white screen really usually means an error is not logged. can you double check that your php.ini contains the error logging enabled ? Also, maybe you could try to do a fresh install of piwik a new directory and copy config/config.ini.php to it ?[/quote]

I just saw this post.I’ll work on it and will let you know if it works.

Best,

Tino

Hi matt,

error logging is turned on in php.ini I double checked.

I also just created a second installation of piwik. Same problem here:
http://cowebserver.com/piwiktest/index.php?module=UserCountry&action=adminIndex&idSite=1&period=day&date=yesterday

I sent you login details via PM so you can check out the test installation first hand.

One thing I noticed is that as soon as I get the blank screen my root access to the server seems to be restricted for a certain time period. Not sure why this is happening.

Are there any other logs on the server I can check out except for the user account error_log?

Thanks

Sorry I’m not sure, could you ask your sysadmin maybe?

I’m currently checking every log we have. I’ll let you know if I find anything.

Tino

So far what I can see is that the access log produces a regular http 200 result however with zero (-) bytes, thus and empty page:

87.78.0.41 - - [22/Oct/2012:10:24:43 -0500] “GET /path/to/piwik/index.php?module=UserCountry&action=adminIndex&idSite=1&period=day&date=yesterday HTTP/1.1” 200 - “http://cowebserver.com/path/to/piwik/index.php?module=UsersManager&action=userSettings&idSite=1&period=day&date=yesterday” "Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0"
87.78.0.41 - - [22/Oct/2012:10:24:49 -0500] “GET /path/to/piwik/index.php?module=UserCountry&action=adminIndex&idSite=1&period=day&date= HTTP/1.1” 200 - “-” “Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0”

Checking all other logs now.

Does anyone have a working GeoIP City database?

I would recommend to update to latest php, geoip extension, or try different GEOIP implementations?

If I update to php, geoip extension od I not need a working GeoIP.dat ?

yes you do need, but maybe the bug wont be there somehow ?

yeah your right that’s worth a try

I solved it!

Had the same problem. Empty Settings Page, no Log Infos.

After debugging code for a while, i narrowed it down to piwik/plugins/UserCountry/LocationProvider/GeoIp/Php.php line 72:

The nasty @ in $location = @geoip_record_by_addr($locationGeoIp, $ip); was preventing a decent log dump. After removing it, i got:

PHP Fatal error: Call to undefined function mb_internal_encoding() in piwik/libs/MaxMindGeoIP/geoipcity.inc on line 130

=> missing mbstring php extension.

I called my sysadmin to install it quickly -> works!

So I guess you Piwik guys need to check for mbstring extension on Geo IP Setings Page?!

Awesome Zero thanks a lot. Will get mbstring installed asap.

Installed mbstring and it is working perfectly now. Again thanks a bunch Zero.