From: Zeev Suraski Date: Mon, 29 May 2000 18:45:06 +0000 (+0000) Subject: Fix startup sequence. It should do it this time. X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~188 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fb954ae4fe5369acc845a4f801731352507de24;p=php Fix startup sequence. It should do it this time. --- 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