cvs: php4 / main.c

[email protected] ("Andi Gutmans")
Newsgroups php.version4
Message-ID <cvsandi958926976@cvsserver>
andi		Sun May 21 18:36:16 2000 EDT

  Modified files:
    /php4	main.c 
  Log:
  - 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.
  
  
Index: php4/main.c
diff -u php4/main.c:1.248 php4/main.c:1.249
--- php4/main.c:1.248	Fri May 19 12:48:05 2000
+++ php4/main.c	Sun May 21 18:36:16 2000
@@ -19,7 +19,7 @@
 */
 
 
-/* $Id: main.c,v 1.248 2000/05/19 10:48:05 thies Exp $ */
+/* $Id: main.c,v 1.249 2000/05/21 16:36:16 andi Exp $ */
 
 
 #include <stdio.h>
@@ -1147,7 +1147,6 @@
 	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 @@
 		}
 	}
 
+	zend_activate_modules();
+
 	if (setjmp(EG(bailout))!=0) {
+		zend_deactivate_modules();
 		return;
 	}
 
@@ -1197,6 +1199,7 @@
 		EG(active_op_array) = EG(main_op_array);
 		zend_execute(EG(main_op_array) ELS_CC);
 	}
+	zend_deactivate_modules();
 }
 
 #ifdef PHP_WIN32
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.