summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-05-29 18:45:06 +0000
committerZeev Suraski <zeev@php.net>2000-05-29 18:45:06 +0000
commit8fb954ae4fe5369acc845a4f801731352507de24 (patch)
tree48a42eb2fa9e52eb683092943f03c7746c913904
parent7213c743f085cf3842418a96fd848f8b93c4d387 (diff)
downloadphp-git-8fb954ae4fe5369acc845a4f801731352507de24.tar.gz
Fix startup sequence. It should do it this time.
-rw-r--r--main/main.c10
-rw-r--r--main/php_globals.h20
-rw-r--r--php4dllts.dsp4
3 files changed, 22 insertions, 12 deletions
diff --git a/main/main.c b/main/main.c
index fdeeb5747a..a8c341acdb 100644
--- a/main/main.c
+++ b/main/main.c
@@ -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
diff --git a/main/php_globals.h b/main/php_globals.h
index 72418e141d..fb1550cb31 100644
--- a/main/php_globals.h
+++ b/main/php_globals.h
@@ -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;
};
diff --git a/php4dllts.dsp b/php4dllts.dsp
index 0cfe939a6b..325b199020 100644
--- a/php4dllts.dsp
+++ b/php4dllts.dsp
@@ -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