* Move unclean_shutdown from PHP to Zend.

* The Master/Local headers in the phpinfo() table were reversed.
* Fix a gpc bug
This commit is contained in:
Zeev Suraski 1999-05-11 16:52:58 +00:00
parent 24dff20afa
commit ba88c0c47c
5 changed files with 7 additions and 11 deletions

View File

@ -212,7 +212,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
val_len = strlen(val);
if (PG(magic_quotes_gpc)) {
val = _php3_addslashes(val, val_len, NULL, 0);
val = _php3_addslashes(val, val_len, &val_len, 0);
} else {
val = estrndup(val, val_len);
}

View File

@ -1160,7 +1160,9 @@ PHPAPI char *_php3_addslashes(char *str, int length, int *new_length, int should
}
}
*target = 0;
if(new_length) *new_length = target - new_str;
if (new_length) {
*new_length = target - new_str;
}
if (should_free) {
STR_FREE(str);
}

View File

@ -599,8 +599,6 @@ static void php_message_handler_for_zend(long message, void *data)
int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
{
PG(unclean_shutdown) = 0;
zend_output_startup();
#if APACHE
@ -675,7 +673,7 @@ void php_request_shutdown(void *dummy)
sapi_deactivate(SLS_C);
php3_destroy_request_info(NULL);
shutdown_memory_manager(PG(unclean_shutdown), 0);
shutdown_memory_manager(CG(unclean_shutdown), 0);
php3_unset_timeout();
@ -1151,7 +1149,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
}
if (setjmp(EG(bailout))!=0) {
PG(unclean_shutdown) = 1;
return;
}
_php3_hash_environment(PLS_C ELS_CC);
@ -1178,8 +1175,6 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
if (EG(main_op_array)) {
EG(active_op_array) = EG(main_op_array);
zend_execute(EG(main_op_array) ELS_CC);
} else {
PG(unclean_shutdown) = 1;
}
}
@ -1207,7 +1202,7 @@ PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mo
php3_TreatHeaders();
file_handle.type = ZEND_HANDLE_FD;
file_handle.handle.fd = fd;
file_handle.filename = request_info.filename;
file_handle.filename = SG(request_info).path_translated;
(void) php_execute_script(&file_handle CLS_CC ELS_CC);
php3_header(); /* Make sure headers have been sent */

View File

@ -64,7 +64,6 @@ struct _php_core_globals {
long y2k_compliance;
unsigned char header_is_being_sent;
unsigned char unclean_shutdown;
};

View File

@ -338,7 +338,7 @@ PHPAPI void display_ini_entries(zend_module_entry *module)
module_number = 0;
}
PUTS("<table border=5 width=\"600\">\n");
php_info_print_table_header(3, "Directive", "Master Value", "Local Value");
php_info_print_table_header(3, "Directive", "Local Value", "Master Value");
zend_hash_apply_with_argument(&known_directives, (int (*)(void *, void *)) php_ini_displayer, (void *) module_number);
PUTS("</table>\n");
}