Permalink
Browse files

Fix startup sequence. It should do it this time.

  • Loading branch information...
1 parent 7213c74 commit 8fb954ae4fe5369acc845a4f801731352507de24 @zsuraski zsuraski committed May 29, 2000
Showing with 22 additions and 12 deletions.
  1. +7 −3 main/main.c
  2. +11 −9 main/php_globals.h
  3. +4 −0 php4dllts.dsp
View
@@ -679,6 +679,7 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
php_output_startup();
/* initialize global variables */
+ PG(modules_activated) = 0;
PG(header_is_being_sent) = 0;
PG(connection_status) = PHP_CONNECTION_NORMAL;
@@ -728,6 +729,9 @@ void php_request_shutdown(void *dummy)
php_ini_rshutdown();
EG(error_reporting) = PG(error_reporting);
+ if (PG(modules_activated)) {
+ zend_deactivate_modules();
+ }
zend_deactivate(CLS_C ELS_CC);
sapi_deactivate(SLS_C);
@@ -1166,6 +1170,9 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
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)) {
if (!strcmp(SG(request_info).query_string+1, PHP_LOGO_GUID)) {
@@ -1186,10 +1193,8 @@ 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;
}
@@ -1218,7 +1223,6 @@ 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
View
@@ -67,8 +67,8 @@ struct _php_core_globals {
zend_bool safe_mode;
zend_bool sql_safe_mode;
- char *safe_mode_exec_dir;
zend_bool enable_dl;
+ char *safe_mode_exec_dir;
long memory_limit;
@@ -97,14 +97,6 @@ struct _php_core_globals {
char *gpc_order;
char *variables_order;
- zend_bool expose_php;
-
- zend_bool track_vars;
- zend_bool register_globals;
- zend_bool register_argc_argv;
-
- zend_bool y2k_compliance;
-
short connection_status;
short ignore_user_abort;
@@ -115,6 +107,16 @@ struct _php_core_globals {
zend_llist tick_functions;
php_http_globals http_globals;
+
+ zend_bool expose_php;
+
+ zend_bool track_vars;
+ zend_bool register_globals;
+ zend_bool register_argc_argv;
+
+ zend_bool y2k_compliance;
+
+ zend_bool modules_activated;
};
View
@@ -1118,6 +1118,10 @@ SOURCE=".\php.ini-dist"
# End Source File
# Begin Source File
+SOURCE=".\php.ini-optimized"
+# End Source File
+# Begin Source File
+
SOURCE=".\README.CVS-RULES"
# End Source File
# Begin Source File

0 comments on commit 8fb954a

Please sign in to comment.