cvs: php4 /sapi/cli php_cli.c

From: Date: Wed, 23 Apr 2003 22:52:45 +0000
Subject: cvs: php4 /sapi/cli php_cli.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20458@lists.php.net to get a copy of this message
helly Wed Apr 23 18:52:45 2003 EDT Modified files: /php4/sapi/cli php_cli.c Log: Revert some ini settings to be hardcoded due to popular demand Index: php4/sapi/cli/php_cli.c diff -u php4/sapi/cli/php_cli.c:1.85 php4/sapi/cli/php_cli.c:1.86 --- php4/sapi/cli/php_cli.c:1.85 Sat Apr 19 11:02:44 2003 +++ php4/sapi/cli/php_cli.c Wed Apr 23 18:52:44 2003 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.85 2003/04/19 15:02:44 helly Exp $ */ +/* $Id: php_cli.c,v 1.86 2003/04/23 22:52:44 helly Exp $ */ #include "php.h" #include "php_globals.h" @@ -281,23 +281,24 @@ /* {{{ sapi_cli_ini_defaults */ +/* overwriteable ini defaults must be set in sapi_cli_ini_defaults() */ #define INI_DEFAULT(name,value)\ ZVAL_STRING(tmp, value, 0);\ zend_hash_update(configuration_hash, name, sizeof(name), tmp, sizeof(zval), (void**)&entry);\ Z_STRVAL_P(entry) = zend_strndup(Z_STRVAL_P(entry), Z_STRLEN_P(entry)) +/* hard coded ini settings must be set in main() */ +#define INI_HARDCODED(name,value)\ + zend_alter_ini_entry(name, sizeof(name), value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); + static void sapi_cli_ini_defaults(HashTable *configuration_hash) { zval *tmp, *entry; MAKE_STD_ZVAL(tmp); - INI_DEFAULT("register_argc_argv", "1"); - INI_DEFAULT("html_errors", "0"); INI_DEFAULT("report_zend_debug", "0"); INI_DEFAULT("display_errors", "1"); - INI_DEFAULT("implicit_flush", "1"); - INI_DEFAULT("max_execution_time", "0"); FREE_ZVAL(tmp); } @@ -605,7 +606,10 @@ /* Set some CLI defaults */ SG(options) |= SAPI_OPTION_NO_CHDIR; /* here is the place for hard coded defaults which cannot be overwritten in the ini file */ - /*zend_alter_ini_entry("<name>", len, "<value>", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);*/ + INI_HARDCODED("register_argc_argv", "1"); + INI_HARDCODED("html_errors", "0"); + INI_HARDCODED("implicit_flush", "1"); + INI_HARDCODED("max_execution_time", "0"); zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */ CG(in_compilation) = 0; /* not initialized but needed for several options */

« previous php.cvs (#20458) next »