Runtime Configuration
The behaviour of these functions is affected by settings in php.ini.
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| output_buffering | "0" | INI_PERDIR | |
| output_handler | null | INI_PERDIR | |
| implicit_flush | "0" | INI_ALL | |
| url_rewriter.tags | "form=" | INI_ALL | As of PHP 7.1.0, this INI setting only affects output_add_rewrite_var(). Prior to PHP 7.1.0, this INI setting enabled transparent session id support (see session.trans_sid_tags). |
| url_rewriter.hosts | $_SERVER['HTTP_HOST'] is used as default. | INI_ALL | Available as of PHP 7.1.0 |
Here's a short explanation of the configuration directives.
output_bufferingbool/intOutput buffering for all files can be enabled by setting this directive to
"On". To limit the size of the buffer, a number/quantity corresponding to the maximum numbers of bytes allowed can be used instead of"On"for the value of this directive. For exampleoutput_buffering=4096. This directive is always Off in PHP-CLI.output_handlerstringThe output of scripts can be redirected to a function. For example setting
output_handlerto mb_output_handler(), character encoding will be transparently converted to the specified encoding. Setting any output handler automatically turns on output buffering.Note:
mb_output_handler() and ob_iconv_handler() cannot be used together and ob_gzhandler() and zlib.output_compression cannot be used with any of the following: mb_output_handler(), ob_gzhandler(), zlib.output_compression, the 'URL-Rewriter' handler (see session.use_trans_sid and output_add_rewrite_var()).
Note:
Only built-in functions can be used with this directive. For user defined functions, use ob_start().
implicit_flushboolfalseby default. Changing this totruetells 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 any function producing output (such as print or echo) and each and every HTML block.When using PHP within an web environment, turning this option on has serious performance implications and is generally recommended for debugging purposes only. This value defaults to
truewhen operating under theCLI SAPI.See also ob_implicit_flush().
url_rewriter.tagsspecifies HTML tags and attributes in which URLs are rewritten by output_add_rewrite_var() values. Defaults to"form=". Adding"form="or anyformattribute will add a hiddeninputelement to theformwith a name and value attribute for each name-value pair passed to output_add_rewrite_var().CautionAdding the same tag more than once to
url_rewriter.tagswill only use the first occurence during the URL rewriting process.Note: Prior to PHP 7.1.0, url_rewriter.tags was used to specify session.trans_sid_tags.
url_rewriter.hostsstringurl_rewriter.hostsspecifies which hosts are rewritten to include output_add_rewrite_var() values. Defaults to$_SERVER['HTTP_HOST']. Multiple hosts can be specified by a comma separated list that does not include spaces. For example"php.net,wiki.php.net,bugs.php.net".