php.net |  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
Votes:7
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: max at kriegt dot es
New email:
PHP Version: OS:

 

 [2012-04-03 14:23 UTC] max at kriegt dot es
Description:
------------
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:
---------------
<?php
ini_set('geoip.custom_directory','/tmp/');
$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"

Patches

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)

Pull Requests

History

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

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] ohill@php.net
-Status: Not a bug +Status: Assigned -Assigned To: +Assigned To: ohill
 [2012-04-18 13:01 UTC] ohill@php.net
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] ohill@php.net
The patch is wrong as it would "stick" a change after the request.
 [2014-04-28 18:38 UTC] ohill@php.net
Automatic comment from SVN on behalf of ohill
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=333445
Log: Bug #61607
 [2014-04-28 18:38 UTC] ohill@php.net
-Status: Assigned +Status: Closed
 [2014-04-28 18:38 UTC] ohill@php.net
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
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 05:01:27 2024 UTC