From dc5cd319e59fc576fcc900ae33105e690bcc9aad Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sun, 21 May 2000 16:36:16 +0000 Subject: [PATCH] - Fix Apache php source highlighting mode. It was crashing due to the - module shutdown functions being called when the startup functions weren't - being called. --- main/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/main.c b/main/main.c index 3b039fc7bc..07a7fd9fa8 100644 --- a/main/main.c +++ b/main/main.c @@ -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 -- 2.50.1