#43598 [Opn]: Patch for Bug #41561 breaks ini_set()
| From: | birne at 007mail dot de | Date: | Fri, 14 Dec 2007 18:18:52 +0000 |
| Subject: | #43598 [Opn]: Patch for Bug #41561 breaks ini_set() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120653@lists.php.net to get a copy of this message | ||
ID: 43598
User updated by: birne at 007mail dot de
Reported By: birne at 007mail dot de
Status: Open
Bug Type: Unknown/Other Function
Operating System: irrelevant
PHP Version: 5.2.5
New Comment:
By the way Bug #43378 mentions the same issue but calls it a
"Documentation problem". In my opinion this is a bug.
Previous Comments:
------------------------------------------------------------------------
[2007-12-14 18:14:00] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43598&edit=1