|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61607 geoip.custom_directory gets ignored when set via ini_set
Submitted: 2012-04-03 14:23 UTC Modified: 2014-04-28 18:38 UTC
Avg. Score:4.4 ± 0.5
Reproduced:7 of 7 (100.0%)
Same Version:2 (28.6%)
Same OS:2 (28.6%)
From: max at kriegt dot es Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 5.4.0 OS: Debian 6.0.1
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.
Bug Type:
From: max at kriegt dot es
New email:
PHP Version: OS:


 [2012-04-03 14:23 UTC] max at kriegt dot es
Apache2 via mod_php5
geoip: 1.0.8
geoip lib: 1004007

When setting a custom_directory for geoip, geoip ignores this value until set in 
the php.ini and restarting apache2.

Test script:
$infos = geoip_db_get_all_info();
$info  = array_shift($infos);

var_dump( $info['filename'] );

Expected result:
string(14) "/tmp/GeoIP.dat"

Actual result:
string(26) "/usr/share/GeoIP/GeoIP.dat"


geoip_custom_directory_patch_rev2 (last revision 2012-04-18 01:01 UTC by tiago dot peralta at sapo dot pt)
geoip_custom_directory_patch (last revision 2012-04-18 00:18 UTC by tiago dot peralta at sapo dot pt)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-03 20:04 UTC]
-Status: Open +Status: Not a bug
 [2012-04-03 20:04 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

It is not possible to use ini_set or htaccess.
 [2012-04-18 00:20 UTC] tiago dot peralta at sapo dot pt
this may not be a bug, but i also found the need to have this feature.

The patch works, the code... well i'm not a C coder so it's really ugly

Best Regards
 [2012-04-18 13:01 UTC]
-Status: Not a bug +Status: Assigned -Assigned To: +Assigned To: ohill
 [2012-04-18 13:01 UTC]
The patch looks good, I'll integrate it in the next release.
 [2013-12-09 15:46 UTC] contact at julienhuang dot com
It's been more than a year now... it seems that the merge/integration of this patch has been forgotten ... ?
 [2014-04-28 18:35 UTC]
The patch is wrong as it would "stick" a change after the request.
 [2014-04-28 18:38 UTC]
Automatic comment from SVN on behalf of ohill
Log: Bug #61607
 [2014-04-28 18:38 UTC]
-Status: Assigned +Status: Closed
 [2014-04-28 18:38 UTC]
The fix for this bug has been committed.

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.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Aug 12 16:01:25 2020 UTC