php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67203 returns data from wrong database column
Submitted: 2014-05-05 01:31 UTC Modified: 2018-08-07 12:43 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: phpnet at revmaps dot no-ip dot ord Assigned:
Status: Open Package: geoip (PECL)
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpnet at revmaps dot no-ip dot ord
New email:
PHP Version: OS:

 

 [2014-05-05 01:31 UTC] phpnet at revmaps dot no-ip dot ord
Description:
------------
---
From manual page: http://www.php.net/function.geoip-country-code-by-name
---

geoip-country-code-by-name appears to return the "registered_country"
rather than the physical location of the server.

physical location is "country" in the geoip2 database, please correct the example code and documentation (or if possible fix the function to match the documentation)

http://dev.maxmind.com/geoip/geoip2/whats-new-in-geoip2/


geoip_lite seems to only have the datat from registered country column... is this intentional?


Test script:
---------------
<?php 
echo geoip_country_code_by_name('46.21.152.252');
// tcptraceroute suggests this server is in USA
// whois says it's in USA but  administered in Poland. (AS35017)


Expected result:
----------------
US

Actual result:
--------------
NL

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-07 12:43 UTC] cmb@php.net
-Package: Network related +Package: geoip
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 22:01:29 2024 UTC