Empty GeoLocation Settings Page after uploading GeoIpCity.dat

Posted by TinoHartung 

Advanced
October 19, 2012 02:57PM
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
matt [ # ]
October 19, 2012 03:36PM
Do you have any error iny our server error log file? Usually white page means error not logged on the screen.



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

October 19, 2012 03:40PM
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() [<a href='function.mysqli-query'>function.mysqli-query</a>]: Empty query in /path/to/piwik/core/Tracker/Db/Mysqli.php on line 130
matt [ # ]
October 19, 2012 03:54PM
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?



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

October 19, 2012 04:10PM
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?
matt [ # ]
October 20, 2012 08:19AM
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 ?



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

matt [ # ]
October 21, 2012 02:37PM
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.



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

October 22, 2012 10:54AM
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 http://www.maxmind.com/en/geolocation_landing?rId=piwik to enjoy top accuracy in detecting your visitors locations.

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

Hi matt,

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

Quote
Piwik FAQ
MaxMind also provides two free databases that are less accurate than the commercial ones. One of the free databases can only be used to determine an IP address' country. The other, called GeoLite City, can be used to determine the same information as the commercial city database.

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
October 22, 2012 05:09PM
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 ?

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

Best,

Tino
October 22, 2012 06:16PM
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
matt [ # ]
October 23, 2012 04:58AM
Sorry I'm not sure, could you ask your sysadmin maybe?



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

October 23, 2012 10:31AM
I'm currently checking every log we have. I'll let you know if I find anything.

Tino
October 23, 2012 11:11AM
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?
matt [ # ]
October 23, 2012 11:13AM
I would recommend to update to latest php, geoip extension, or try different GEOIP implementations?



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

October 23, 2012 11:18AM
If I update to php, geoip extension od I not need a working GeoIP.dat ?
matt [ # ]
October 23, 2012 11:24AM
yes you do need, but maybe the bug wont be there somehow ?



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

October 23, 2012 11:57AM
yeah your right that's worth a try
Zero [ # ]
October 23, 2012 01:53PM
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?!
October 23, 2012 02:31PM
Awesome Zero thanks a lot. Will get mbstring installed asap.
October 23, 2012 02:59PM
Installed mbstring and it is working perfectly now. Again thanks a bunch Zero.
Zero [ # ]
October 23, 2012 03:03PM
You are welcome! No need, that other people run into the same valley of tears ;-)
matt [ # ]
October 23, 2012 10:37PM
Awesome! Thanks for finding the issue. I created a ticket at: [dev.piwik.org]

we will fix it for next release.



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

matt [ # ]
January 01, 2013 10:34AM
We need YOUR help! We are running a crowd funding campaign to raise funds to implement the detailed Visitors Maps of Countries, Regions and Cities (for all countries)!

These maps will be beautiful, usable, and built using open standards SVG+JS. They will show detailed visitor count, conversion rates, by Country but also (New!) by city and region.

Pledge now at: [crowdfunding.piwik.org]

There will be no more flash in Piwik and we will add amazing new Maps of your visitors.

Piwik needs you!



Cheers,
Matt
Piwik founder

Piwik FAQ - Piwik Help - before posting a new topic
Stay tuned on the Piwik Blog. You may follow me on twitter & on github

Sorry, only registered users may post in this forum.

Click here to login

Free Forum support is provided by the Piwik Community. If you require any urgent or professional help, contact Piwik Professional Services team!