1

i have the following php-code

<?php
$record = geoip_record_by_name('2001:4860:0:2001::68');
#$record = geoip_record_by_name('8.8.8.8');
if ($record) {
print_r($record);
}

but unfortunately i dont work for ipv6. With ipv4 it is working. I already checked the link geoip_record_by_name returns nothing?

Returns the associative array on success, or FALSE if the address cannot be found in the database.

The google ipv6 2001:4860:0:2001::68 should be found. In reference to https://bugs.php.net/bug.php?id=59124 it should be fixxed in geoip 1.1.1 which i am running of course. The GeoLite Country IPv6 Database is active too in my setup.

happenz
  • 43
  • 2
  • 5
  • Have you tried a more verbose error level? Or is there anything written to the server's error log? – Nico Haase Jun 14 '18 at 07:56
  • 1
    @NicoHaase i straced the process and found out that only my ipv4 database is being used. I found this post: [link](https://stackoverflow.com/questions/30113161/getting-ipv6-support-with-php5-geoip-and-maxmind-database) and included the geoip.inc and the code but now i am getting _Cannot redeclare geoip_country_code_by_name()_ [link](https://github.com/maxmind/geoip-api-php/issues/27) seems to be a problem with my pecl extension installed if i deactivate it i get a _Call to undefined function geoip_open()_ – happenz Jun 14 '18 at 11:24

0 Answers0