#41561 [NEW]: Values set with php_admin_* in httpd.conf can be overwritten with ini_set()

From: Date: Fri, 01 Jun 2007 15:23:16 +0000
Subject: #41561 [NEW]: Values set with php_admin_* in httpd.conf can be overwritten with ini_set()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113268@lists.php.net to get a copy of this message
From:             samy-delux at gmx dot de
Operating system: Ubuntu Linux
PHP version:      5.2.3
PHP Bug Type:     PHP options/info functions
Bug description:  Values set with php_admin_* in httpd.conf can be overwritten with ini_set()

Description:
------------
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!

Reproduce code:
---------------
/etc/apache2/httpd.conf :
php_admin_value memory_limit 3145728


iniset_test.php :
<?php

$old = ini_set("memory_limit", 20971520);

echo "old: ".$old;

$new = ini_get("memory_limit");

echo "<br>new: ".$new;

?>

Expected result:
----------------
The result is the following:
old: 3145728
new: 3145728 

Actual result:
--------------
The result is the following:
old: 3145728
new: 20971520 

-- 
Edit bug report at http://bugs.php.net/?id=41561&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41561&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41561&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41561&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41561&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=41561&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41561&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41561&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41561&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41561&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41561&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=41561&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=41561&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41561&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41561&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41561&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41561&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41561&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41561&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41561&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41561&r=mysqlcfg


Thread (16 messages)

« previous php.bugs (#113268) next »