php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57495 Only works with country database
Submitted: 2007-01-26 20:21 UTC Modified: 2007-06-18 08:56 UTC
From: david at acz dot org Assigned: ohill (profile)
Status: Not a bug Package: geoip (PECL)
PHP Version: 5.2.0 RC4 OS: SuSE Linux 9.3
Private report: No CVE-ID: None
 [2007-01-26 20:21 UTC] david at acz dot org
Description:
------------
I couldn't get it to work with the DMA code database (product ID 137).  It seems to only work with the country database.  The documentation should contain a warning that this code is incomplete and that Net_GeoIP should be used for non-country databases.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-15 09:59 UTC] ohill@php.net
It should work with every database supported by the underlying C library.

Could you provide a short code example and the results.
 [2007-02-22 13:32 UTC] ohill@php.net
The GeoIP module uses the GeoIP C Library which has static filenames directly compiled in.

Try renaming the file GeoIPCity-137.dat to GeoIPCity.dat or symlinking it (could be located inside /usr/share/GeoIP as an example).

You can try running geoiplookup on the command line:

$ geoiplookup example.com
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, CA, (null), (null), 0.000000, 0.000000, 803, 0
GeoIP City Edition, Rev 0: US, CA, (null), (null), 0.000000, 0.000000

The DMA code here is 803, on the City Edition line. If this works, the PHP module should too.
 [2007-02-22 15:54 UTC] david at acz dot org
The C library does not recognize the name GeoIPDMACode.dat, even though the geoipupdate program names it that.  Renaming to GeoIPCity.dat works.  The C library needs to be updated.
 [2007-06-18 08:56 UTC] ohill@php.net
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

This should be reported on Maxmind site, as the last comment is regarding the C lib and not the PHP extension.

Thank you for your feedback.
 [2007-07-12 07:08 UTC] tripti_261 at yahoo dot co dot in
cvnhbvnbvnbvn
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 13:01:27 2024 UTC