Concerning bug #5076
| From: | Benoit Artuso | Date: | Tue, 31 Oct 2000 12:44:08 +0000 |
| Subject: | Concerning bug #5076 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36519@lists.php.net to get a copy of this message | ||
Hello,
(little background about the bug :
when using command line php and the -d option, the changes to the
configuration are not taken into account.
IE :
php -d include_path=.:/some/directory -i
will give only the value in php.ini.
)
After some tracing, I found that the bug was related to the function
define_command_line_ini_entry()
in sapi/cgi/cgi_main.c when calling php_alter_ini_entry().
It seems that the arguments are not correct specially the size of the
variable 'name'.
Around line 392, we should read :
php_alter_ini_entry(name, strlen(name)+1, value, strlen(value), PHP_INI_SYSTEM,
PHP_INI_STAGE_ACTIVATE);
instead of :
php_alter_ini_entry(name, strlen(name), value, strlen(value), PHP_INI_SYSTEM,
PHP_INI_STAGE_ACTIVATE);
Now, the question is : should we do the same for the size of the variable
'value' ?
--
Benoit Artuso