cvs: /php4 main.c /php4/ext/standard output.c

From: Date: Tue, 23 Nov 1999 03:11:17 +0000
Subject: cvs: /php4 main.c /php4/ext/standard output.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-6717@lists.php.net to get a copy of this message
rubys Mon Nov 22 22:11:17 1999 EDT Modified files: /php4 main.c /php4/ext/standard output.c Log: errors during startup trap server Index: php4/main.c diff -u php4/main.c:1.136 php4/main.c:1.137 --- php4/main.c:1.136 Mon Nov 22 15:58:55 1999 +++ php4/main.c Mon Nov 22 22:10:45 1999 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.136 1999/11/22 20:58:55 zeev Exp $ */ +/* $Id: main.c,v 1.137 1999/11/23 03:10:45 rubys Exp $ */ #include <stdio.h> @@ -434,13 +434,13 @@ } /* get include file name */ - if (PG(log_errors) || PG(display_errors)) { + if (PG(log_errors) || PG(display_errors) || (!module_initialized)) { va_start(args, format); size = vsnprintf(buffer, sizeof(buffer) - 1, format, args); va_end(args); buffer[sizeof(buffer) - 1] = 0; - if (PG(log_errors)) { + if (PG(log_errors) || (!module_initialized)) { char log_buffer[1024]; snprintf(log_buffer, 1024, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno); @@ -847,6 +847,7 @@ #ifdef ZTS static void core_globals_ctor(php_core_globals *core_globals) { + memset(core_globals,0,sizeof(*core_globals)); zend_hash_init(&core_globals->ht_fsock_keys, 0, NULL, NULL, 1); zend_hash_init(&core_globals->ht_fsock_socks, 0, NULL, (int (*)(void *))php_msock_destroy, 1); } Index: php4/ext/standard/output.c diff -u php4/ext/standard/output.c:1.2 php4/ext/standard/output.c:1.3 --- php4/ext/standard/output.c:1.2 Mon Nov 22 15:58:56 1999 +++ php4/ext/standard/output.c Mon Nov 22 22:10:46 1999 @@ -81,7 +81,7 @@ #endif -PHP_MINIT_FUNCTION(output) +PHP_GINIT_FUNCTION(output) { #ifdef ZTS output_globals_id = ts_allocate_id(sizeof(php_output_globals), NULL, NULL); @@ -111,14 +111,15 @@ php3_module_entry output_module_entry = { "PHP_output", php_output_functions, - PHP_MINIT(output), /* extension-wide startup function */ - NULL, /* extension-wide shutdown function */ - PHP_RINIT(output), /* per-request startup function */ - PHP_RSHUTDOWN(output), /* per-request shutdown function */ - NULL, /* information function */ - STANDARD_MODULE_PROPERTIES + NULL, /* extension-wide startup function */ + NULL, /* extension-wide shutdown function */ + PHP_RINIT(output), /* per-request startup function */ + PHP_RSHUTDOWN(output), /* per-request shutdown function */ + NULL, /* information function */ + PHP_GINIT(output), /* global startup function */ + NULL, /* global shutdown function */ + STANDARD_MODULE_PROPERTIES_EX }; - PHP_RINIT_FUNCTION(output) {

« previous php.version4 (#6717) next »