diff options
author | Marcus Boerger <helly@php.net> | 2002-11-05 15:15:51 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2002-11-05 15:15:51 +0000 |
commit | 64d3e88266ebd0d9218976c6b30b345060b8935e (patch) | |
tree | 8a0f6e2a46f93ecdd3d6b038520fc66fb88973cd /sapi | |
parent | 77858f7fcd977cab007f38b97b4ccf30db915f29 (diff) | |
download | php-git-64d3e88266ebd0d9218976c6b30b345060b8935e.tar.gz |
call php_module_startup after zts has been initialised. This way we could
have called zend_ini_deactivate(TSRMLS_C). But it seems unnecessary.
#tested with ZTS and non ZTS build and many manual fail points.
#now it even compiles without any warning, at least for me
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cli/php_cli.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 092369b98e..28a06a1733 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -431,12 +431,6 @@ int main(int argc, char *argv[]) cli_sapi_module.executable_location = argv[0]; - /* startup after we get the above ini override se we get things right */ - if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) { - goto err; - } - module_started = 1; - #ifdef ZTS compiler_globals = ts_resource(compiler_globals_id); executor_globals = ts_resource(executor_globals_id); @@ -445,6 +439,18 @@ int main(int argc, char *argv[]) tsrm_ls = ts_resource(0); #endif + /* startup after we get the above ini override se we get things right */ + if (php_module_startup(&cli_sapi_module, NULL, 0)==FAILURE) { + /* there is no way to see if we must call zend_ini_deactivate() + * since we cannot check if EG(ini_directives) has been initialised + * because the executor's constructor does not set initialize it. + * Apart from that there seems no need for zend_ini_deactivate() yet. + * So we goto out_err.*/ + exit_status = 1; + goto out_err; + } + module_started = 1; + zend_first_try { while ((c=ap_php_getopt(argc, argv, OPTSTRING))!=-1) { switch (c) { |