]> granicus.if.org Git - php/commitdiff
- Fix Apache php source highlighting mode. It was crashing due to the
authorAndi Gutmans <andi@php.net>
Sun, 21 May 2000 16:36:16 +0000 (16:36 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 21 May 2000 16:36:16 +0000 (16:36 +0000)
- module shutdown functions being called when the startup functions weren't
- being called.

main/main.c

index 3b039fc7bc2f80a066ced48e2247648bc57cf09f..07a7fd9fa87c7ea4fe91ea148afc40544277176b 100644 (file)
@@ -1147,7 +1147,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
        SLS_FETCH();
 
        php_hash_environment(ELS_C SLS_CC PLS_CC);
-       zend_activate_modules();
        if (SG(request_info).query_string && SG(request_info).query_string[0]=='=' 
                && PG(expose_php)) {
                if (!strcmp(SG(request_info).query_string+1, PHP_LOGO_GUID)) {
@@ -1168,7 +1167,10 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
                }
        }
 
+       zend_activate_modules();
+
        if (setjmp(EG(bailout))!=0) {
+               zend_deactivate_modules();
                return;
        }
 
@@ -1197,6 +1199,7 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
                EG(active_op_array) = EG(main_op_array);
                zend_execute(EG(main_op_array) ELS_CC);
        }
+       zend_deactivate_modules();
 }
 
 #ifdef PHP_WIN32