php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43598 Patch for Bug #41561 breaks ini_set()
Submitted: 2007-12-14 18:14 UTC Modified: 2007-12-17 09:21 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: birne at 007mail dot de Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.5 OS: irrelevant
Private report: No CVE-ID: None
 [2007-12-14 18:14 UTC] birne at 007mail dot de
Description:
------------
The Author of Bug #41561 wrote:

<quote>
When I set a value inside the httpd.conf with php_admin_value or
php_admin_flag that is INI_ALL or INI_PERDIR it can be overwritten at
runtime using ini_set()

I don't think this should be possible. But the documentation on this
problem doesn't assure me if this is a bug or a feature!
</quote>

Unfortunately, his question was neither discussed nor answered. Also I disagree that is should not be possible re-setting the value of a INI_ALL configuration directive with ini_set().

According to http://www.php.net/manual/en/ini.php PHP_INI_ALL means "Entry can be set anywhere". In my opinion this mutually includes "Entry can be changed anywhere". 

Currently setting e.g. the include_path using ini_set('include_path', ..) or set_include_path(..) will fail when there is a php_admin_value include_path directive in the apache configuration. The include_path is a PHP_INI_ALL directive.



Reproduce code:
---------------
Set in apaches https.conf

  php_admin_value include_path .:/usr/share/php:/server/wide/libs/


and the run 

if (!set_include_path(get_include_path().PATH_SEPARATOR.'local/libs/')) {
	echo 'set_include_path() failed';
} else {
	echo get_include_path();
}


Expected result:
----------------
.:/usr/share/php:/server/wide/libs/:local/libs/

Actual result:
--------------
set_include_path() failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-14 18:18 UTC] birne at 007mail dot de
By the way Bug #43378 mentions the same issue but calls it a "Documentation problem". In my opinion this is a bug.
 [2007-12-17 09:21 UTC] sniper@php.net
php_admin_* is supposed to make any such option unusable by anybody in any script. And it's meant for hosting companies..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC