From 5583203e9197d35228bee103ea6b684ca8378180 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Thu, 26 Oct 2000 18:32:38 +0000 Subject: [PATCH] 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. --- main/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main/main.c b/main/main.c index fd77245d972..888bb9ec1ba 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)) {