From 24156db2526e62a653e5769b1492366701e815d4 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Thu, 13 Jan 2000 20:39:33 +0000 Subject: [PATCH] @- Added implicit_flush INI directive (Zeev) --- main/main.c | 3 +++ main/php_globals.h | 1 + php.ini-dist | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/main/main.c b/main/main.c index 02fab678d3..fdde838139 100644 --- a/main/main.c +++ b/main/main.c @@ -190,6 +190,7 @@ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference", "1", PHP_INI_ALL, OnUpdateBool, allow_call_time_pass_reference, php_core_globals, core_globals) PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision) STD_PHP_INI_BOOLEAN("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, output_buffering, php_core_globals, core_globals) + STD_PHP_INI_BOOLEAN("implicit_flush", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, implicit_flush, php_core_globals, core_globals) PHP_INI_ENTRY_EX("highlight.comment", HL_COMMENT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) PHP_INI_ENTRY_EX("highlight.default", HL_DEFAULT_COLOR, PHP_INI_ALL, NULL, php_ini_color_displayer_cb) @@ -728,6 +729,8 @@ int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC) if (PG(output_buffering)) { php_start_ob_buffering(); + } else if (PG(implicit_flush)) { + php_start_implicit_flush(); } if (SG(request_info).auth_user) { diff --git a/main/php_globals.h b/main/php_globals.h index 7aba87cf3c..b944bbc5d1 100644 --- a/main/php_globals.h +++ b/main/php_globals.h @@ -53,6 +53,7 @@ struct _php_core_globals { zend_bool allow_call_time_pass_reference; zend_bool zend_set_utility_values; zend_bool output_buffering; + zend_bool implicit_flush; zend_bool safe_mode; zend_bool sql_safe_mode; diff --git a/php.ini-dist b/php.ini-dist index 99a07c8a21..d3d4aae294 100644 --- a/php.ini-dist +++ b/php.ini-dist @@ -56,6 +56,12 @@ output_buffering = Off ; Output buffering allows you to send header lines (inclu ; You can enable output buffering by in runtime by calling the output ; buffering functions, or enable output buffering for all files ; by setting this directive to On. +implicit_flush = Off ; Implicit flush tells PHP to tell the output layer to flush itself + ; automatically after every output block. This is equivalent to + ; calling the PHP function flush() after each and every call to print() + ; or echo() and each and every HTML block. + ; Turning this option on has serious performance implications, and + ; is generally recommended for debugging purposes only. allow_call_time_pass_reference = On ; whether to enable the ability to force arguments to be ; passed by reference at function-call time. This method ; is deprecated, and is likely to be unsupported in future -- 2.40.0