|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59804 Failed Tests due to new databases & changes in the timeZone.c api
Submitted: 2011-06-06 10:33 UTC Modified: 2011-10-24 00:25 UTC
From: mike at digitalstruct dot com Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 5.3.6 OS: Ubuntu 10.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mike at digitalstruct dot com
New email:
PHP Version: OS:


 [2011-06-06 10:33 UTC] mike at digitalstruct dot com
The latest GeoIP contains many new files; by changing the 
tests for 2 of the files it fixes 2 tests.  There is also a 
change in how the timeZone.c does "CA" which failed another 

I have updated the tests to pass for the current SVN.

Reproduce code:
Patch file:

Expected result:
Tests pass.

Actual result:
Exts skipped    :    0
Exts tested     :   45

Number of tests :   15                15
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    3 ( 20.0%) ( 20.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   12 ( 80.0%) ( 80.0%)
Time taken      :    0 seconds

Calling geoip_db_filename() with a non-existant database 
type within bound. [tests/008.phpt]
Calling geoip_database_info() with a non-existant database 
type within bound. [tests/011.phpt]
Checking timezone info with (some) empty fields 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-06-06 10:45 UTC]
Your patch works, but will fail with old library installed.

If some values have changed in the lib, perhaps we should not use those tests at all.
 [2011-06-06 10:54 UTC] mike at digitalstruct dot com
Well; the library changed for timeZone.c for the values in 
test 014.  I can DL some older versions of the library and 
run some tests against those.

In tests 008 and 011 those are values that are now never 
going to be utilized. I could update it based on the version 
of the GeoIP library for the tests to function correctly for 
older editions.  If you look at the GeoIP.h header for the 
library it states:
but gaps are not allowed */
GEOIP_CCM_COUNTRY_EDITION =20,  /* unsued, but gaps are not 
allowed */
which is probably the safest directory as they are the only 
ones that are not looking for a file in any location.

The largest issue I see here is that the tests fail on the 
newer versions of the library which are now becoming 
standard in most of the distributions.
 [2011-10-24 00:25 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ohill
 [2011-10-24 00:25 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Except #14, which I will have to change completely.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 23 23:03:33 2021 UTC