]> granicus.if.org Git - php/commitdiff
Move some initialization code from php_execute_script() to
authorSascha Schumann <sas@php.net>
Thu, 26 Oct 2000 18:32:38 +0000 (18:32 +0000)
committerSascha Schumann <sas@php.net>
Thu, 26 Oct 2000 18:32:38 +0000 (18:32 +0000)
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

index fd77245d9724014e5245a1176a58de6432c1b159..888bb9ec1baf77a175b98870bdd0d98dd4b0a8f6 100644 (file)
@@ -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)) {