Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geo location should detect country, region and city from IPv6 addresses #3581

Closed
anonymous-piwik-user opened this issue Nov 26, 2012 · 20 comments

Comments

@anonymous-piwik-user
Copy link

commented Nov 26, 2012

Notice: geoip_country_code_by_name(): Host 2607:f878:fe00:19::2 not found in /srv/www/christoph/www-root/de/siccegge/stats/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php on line 80

Backtrace -->

#0 Piwik_ErrorHandler(...) called at [:]
#1 geoip_country_code_by_name(...) called at [/srv/www/christoph/www-root/de/siccegge/stats/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php:80]
#2 Piwik_UserCountry_LocationProvider_GeoIp_Pecl->getLocation(...) called at [/srv/www/christoph/www-root/de/siccegge/stats/plugins/UserCountry/LocationProvider.php:229]
#3 Piwik_UserCountry_LocationProvider::getAllProviderInfo(...) called at [/srv/www/christoph/www-root/de/siccegge/stats/plugins/UserCountry/Controller.php:40]
#4 Piwik_UserCountry_Controller->adminIndex(...) called at [:]
#5 call_user_func_array(...) called at [/srv/www/christoph/www-root/de/siccegge/stats/core/FrontController.php:138]
#6 Piwik_FrontController->dispatch(...) called at [/srv/www/christoph/www-root/de/siccegge/stats/index.php:53]
@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Nov 27, 2012

Attachment: Patch for Piwik's bundled MaxMind PHP GeoIP libs
maxmind-libs-ipv6.patch

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Nov 27, 2012

The PECL GeoIP doesn't support IPv6 yet. However, a patch is available here: https://bugs.php.net/bug.php?id=59124

I've attached a patch to make piwik's MaxMind PHP lib play nice with the other patch.

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Nov 27, 2012

Attachment: GeoIP changes for IPv6
piwik-geoip-ipv6.patch

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Nov 27, 2012

Here's a somewhat complete changeset that would be required for IPv6 Support.

I have tested it on Fedora 18: Apache 2.4 with PHP 5.4.9, latest mod_geoip2 master branch from https://github.com/maxmind/geoip-api-mod_geoip2 (should work on 1.2.7 though) and patched PECL GeoIP with Patch from https://bugs.php.net/bug.php?id=59124

Haven't tested on non patched/stable environment yet as I didn't have the time to set up a clean VM for that yet. So I'd appreciate any testing :)

@mattab

This comment has been minimized.

Copy link
Member

commented Dec 13, 2012

@heffer Thanks for the patch. It does look interesting and we would like to consider committing the patch. Can you please add some tests? For example maybe you could update this test: ManyVisitorsOneWebsiteTest.php

See test instructions: https://github.com/piwik/piwik/blob/master/tests/README.txt

with tests we can safely consider the code and check it's working!

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Dec 14, 2012

I will look into writing the tests during the Christmas break because I'm pretty busy right now. If you need it before then we'd need to find someone else to do it.

@mattab

This comment has been minimized.

Copy link
Member

commented Dec 14, 2012

We don't need it quickly (it is a bonus for us that you worked on it), after Christmas will be perfect, thanks so much!

@mattab

This comment has been minimized.

Copy link
Member

commented Mar 11, 2013

@heffer any update on Geoip with ipv6 support? thanks for your time!

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Jul 31, 2013

bump! hello everybody... is there a patch for ipv6 adresses? many thanks!

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Jul 31, 2013

I stopped working on this after noticing that the tests were somewhat broken. I can't remember what the exact issue was, it's been some months. However, currently I can't find the time to work on this right now.

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Aug 1, 2013

thanks for the answer. Actually I opened another ticked because i noticed that there are two free databases http://dev.maxmind.com/geoip/legacy/geolite/
one for ipv4 and one for ipv6

it is not possible to simply merge the two databases? (noob question probably)

@anonymous-piwik-user

This comment has been minimized.

Copy link
Author

commented Jan 28, 2014

Could you maybe update the patch against the current release?

Was it already considered by the devs maybe? Anything wrong with it?

@mattab

This comment has been minimized.

Copy link
Member

commented Jan 28, 2014

The patch looks fine! I'd like to commit it to Piwik. If you can make a pull request (after testing that it works), we will do our best to merge quickly! cheers

@mattab

This comment has been minimized.

Copy link
Member

commented May 14, 2014

see also #4487: New feature: Make geoip backend work with geoip2

@mattab

This comment has been minimized.

Copy link
Member

commented Jun 16, 2014

see also: #5348 GeoIP Server (Apache module) compatibility with IP V6

@mygithuber

This comment has been minimized.

Copy link

commented Oct 23, 2014

There seems to be an aggravation, noticed in Piwik v2.8.1:
Visitor log doesn't show visitor's provider if it comes with an IPv6 adress, pls notice attached screenshot (label "unbekannt" ) .
Settings: GeoIP(PECL) is working with Maxmind's 'GeoLite City', visitor's privacy is set as shown in screenshot.

Pls look at #4391 too.

367b71ca-5a8b-11e4-834d-047
2a6a2674-5a8b-11e4-80b8-ded6210fac35

@mattab

This comment has been minimized.

Copy link
Member

commented Oct 23, 2014

@mygithuber thanks for the report! Can you please create a new issue with your report? it will help schedule work on the fix faster. thanks!

for more info on how we manage backlog http://developer.piwik.org/guides/core-team-workflow#how-we-organise-issues

@mattab

This comment has been minimized.

Copy link
Member

commented Nov 3, 2014

Check out the Pull request being discussed: IPv6 support #6574

@mattab

This comment has been minimized.

Copy link
Member

commented Oct 2, 2015

see
Geo location support for IPv6 addresses #6690
Geo location ipv6 for PECL extension #6624
#5348

@mattab mattab closed this Oct 2, 2015
@mattab mattab added the answered label Oct 2, 2015
@evgenij8585

This comment has been minimized.

Copy link

commented Sep 4, 2018

you will be helped by service Geolocation IpV4, IpV6, domains name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.