From: Sascha Schumann Date: Thu, 26 Oct 2000 18:32:38 +0000 (+0000) Subject: Move some initialization code from php_execute_script() to X-Git-Tag: php-4.0.4RC3~516 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5583203e9197d35228bee103ea6b684ca8378180;p=php Move some initialization code from php_execute_script() to php_request_startup() where it should be. AFAICT, it does not cause any problems, but please it test it with your favorite SAPI module. --- diff --git a/main/main.c b/main/main.c index fd77245d97..888bb9ec1b 100644 --- a/main/main.c +++ b/main/main.c @@ -595,6 +595,7 @@ static void sigchld_handler(int apar) } #endif +static int php_hash_environment(ELS_D SLS_DC PLS_DC); int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) { @@ -631,6 +632,10 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) /* We turn this off in php_execute_script() */ /* PG(during_request_startup) = 0; */ + php_hash_environment(ELS_C SLS_CC PLS_CC); + zend_activate_modules(); + PG(modules_activated)=1; + return SUCCESS; } @@ -1135,10 +1140,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ char *old_cwd; SLS_FETCH(); - php_hash_environment(ELS_C SLS_CC PLS_CC); - - zend_activate_modules(); - PG(modules_activated)=1; if (SG(request_info).query_string && SG(request_info).query_string[0]=='=' && PG(expose_php)) {