PHP 4.0 Bug #10004: PHP_INI_BEGIN overrides ini value while it probably shouldn't

From: Date: Mon, 26 Mar 2001 20:51:07 +0000
Subject: PHP 4.0 Bug #10004: PHP_INI_BEGIN overrides ini value while it probably shouldn't
Groups: php.dev 
Request: Send a blank email to php-dev+get-49985@lists.php.net to get a copy of this message
From: shodan@chat.ru Operating system: Linux PHP version: 4.0.4pl1 PHP Bug Type: Scripting Engine problem Bug description: PHP_INI_BEGIN overrides ini value while it probably shouldn't Hello. I'm doing an extension module for PHP. I've tried to use API functions to access INI file strings and found a bug (?) when default value overrides the value present in php.ini. More specifially, I declared PHP_INI_ENTRY("test.string", NULL, PHP_INI_ALL, NULL) and written PHP_FUNCTION(show_ini_value) { char *ini; int len; ini = INI_STR("test.string"); if (ini) { RETURN_STRINGL(ini, 1); } else { RETURN_STRINGL("(default), 1); } } Everything other is exactly the default code in sample skeleton. Now, I did phpize ./configure make to build test.so, installed it and restarted Apache. For the first time, <?=show_ini_value()?> produced the string from php.ini. For the second time and the following tries it replied with "(default)". Am I doing something wrong or is this a bug in PHP? Please reply either to my e-mail or to php-dev list. Thanks. -- Edit Bug report at: http://bugs.php.net/?id=10004&edit=1

« previous php.dev (#49985) next »