From: Operating system: Linux (Ubuntu) PHP version: 5.3SVN-2011-07-14 (SVN) Package: Unknown/Other Function Bug Type: Bug Bug description:Missing region names from geoip library
Description: ------------ PHP Version: PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch (cli) (built: Jan 12 2011 16:07:38) GeoIP version: GEO-106 20110510 Build 1 Copyright (c) 2011 MaxMind Inc All Rights Reserved Description: Upon calling geoip_region_name_by_code for certain regions, the region name returned is empty. Ex: echo geoip_region_name_by_code("AG","08"); // Returns: Saint Philip echo geoip_region_name_by_code("AG","09"); // Returns: Nothing What is expected: The geoip_region_name_by_code function to return the correct region name for all regions described in the standard http://www.maxmind.com/app/fips10_4 (Note: This link is even published on http://www.php.net/manual/en/function.geoip-region-name-by-code.php) The issue: As mentioned on http://www.php.net/manual/en/function.geoip-region-name-by- code.php The data is taken directly from the GeoIP Library and not from any database. This means that the php geoip library has to be updated. Solution: Small mindless work of updating the source code of the php geoip library with the missing regions. (44 of them): Country Region AG 09 CG 13 CG 14 HU 43 MD 57 MV 30 MV 31 MV 32 MV 33 MV 34 MV 35 MV 36 MV 37 MV 38 MV 39 MV 41 MV 42 MV 43 MV 44 MV 45 MV 46 MV 47 TN 10 UG 26 UG 28 UG 29 UG 30 UG 31 UG 38 UG 39 UG 40 UG 41 UG 43 UG 45 UG 46 UG 47 UG 50 UG 58 UG 59 UG 60 UG 61 UG 70 UG 72 UG 76 Test script: --------------- echo geoip_region_name_by_code("AG","08"); Saint Philip // Working! echo geoip_region_name_by_code("AG","09"); // Nothing ... Expected result: ---------------- The region name according to http://www.maxmind.com/app/fips10_4 -- Edit bug report at https://bugs.php.net/bug.php?id=55203&edit=1 -- Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55203&r=trysnapshot52 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55203&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55203&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55203&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55203&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55203&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55203&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55203&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55203&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55203&r=support Expected behavior: https://bugs.php.net/fix.php?id=55203&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55203&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55203&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55203&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55203&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55203&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55203&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55203&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55203&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55203&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55203&r=mysqlcfg Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55203&r=trysnapshot54