From 9820dd092765ec451eaebafc9d3bee63c9d698a9 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Mon, 22 Nov 1999 20:58:56 +0000 Subject: [PATCH] Fixed a leak when using automatic output buffering @ Fixed a leak when using automatic output buffering (Zeev) --- ext/standard/output.c | 1 + main/main.c | 7 ++++--- main/output.c | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ext/standard/output.c b/ext/standard/output.c index e1c0226afd..0eecddb40f 100644 --- a/ext/standard/output.c +++ b/ext/standard/output.c @@ -119,6 +119,7 @@ php3_module_entry output_module_entry = { STANDARD_MODULE_PROPERTIES }; + PHP_RINIT_FUNCTION(output) { php_output_startup(); diff --git a/main/main.c b/main/main.c index 249390136a..c79a97389e 100644 --- a/main/main.c +++ b/main/main.c @@ -710,9 +710,6 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) php_output_startup(); php_init_post_request_startup(PLS_C); - if (PG(output_buffering)) { - php_start_ob_buffering(); - } #if APACHE /* * For the Apache module version, this bit of code registers a cleanup @@ -740,6 +737,10 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) zend_activate(CLS_C ELS_CC); sapi_activate(SLS_C); + if (PG(output_buffering)) { + php_start_ob_buffering(); + } + if (SG(request_info).auth_user) { zval *auth_user; diff --git a/main/output.c b/main/output.c index e1c0226afd..0eecddb40f 100644 --- a/main/output.c +++ b/main/output.c @@ -119,6 +119,7 @@ php3_module_entry output_module_entry = { STANDARD_MODULE_PROPERTIES }; + PHP_RINIT_FUNCTION(output) { php_output_startup(); -- 2.50.1