Re: Default INI entries overwrite php.ini entries

From: Date: Sat, 13 Jan 2001 13:08:15 +0000
Subject: Re: Default INI entries overwrite php.ini entries
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-43967@lists.php.net to get a copy of this message
At 14:21 13/1/2001, Sascha Schumann wrote:
    Shouldn't php.ini entries overwrite defaults and become the
    master value?
Yep
    That is what happens currently: php.ini entries are applied
    using zend_alter_ini_entry(), and the default value is stored
    in orig_value.  On the next request shutdown,
    zend_deactivate() calls zend_ini_deactive() which in turn
    overwrites the php.ini entry with orig_value.
register_ini_entries(), which is the service function that modules use to register their entries, doesn't use alter_ini_entry(). It checks the configuration hash (=php.ini) for a default value. If it exists, it uses it as the default value (it doesn't use alter_ini_entry()), if it doesn't - it uses the built-in default. I looked at the actual code, and apparently, there's a useless call to alter_ini_entry() in the php.ini reader. Since the INI entries have not yet been registered (register_ini_entries() has not been called yet), alter_ini_entry() fails at this point. This doesn't change what I said in the previous paragraph though - it should still work. Zeev -- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/

« previous php.dev (#43967) next »