Source of: /manual/en/zlib.configuration.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/zlib.setup.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'zlib.configuration.php',
1 => 'Runtime Configuration',
),
'up' =>
array (
0 => 'zlib.setup.php',
1 => 'Installing/Configuring',
),
'prev' =>
array (
0 => 'zlib.installation.php',
1 => 'Installation',
),
'next' =>
array (
0 => 'zlib.resources.php',
1 => 'Resource Types',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="zlib.configuration" class="section">
<h2 class="title">Runtime Configuration</h2>
<p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
<p class="para">
The zlib extension offers the option to transparently compress
your pages on-the-fly, if the requesting browser supports
this. Therefore there are three options in the <a href="configuration.file.php" class="link">configuration file</a> <var class="filename">php.ini</var>.
</p><table class="doctable table">
<caption><b>Zlib Configuration Options</b></caption>
<thead valign="middle">
<tr valign="middle">
<th>Name</th>
<th>Default</th>
<th>Changeable</th>
<th>Changelog</th>
</tr>
</thead>
<tbody valign="middle" class="tbody">
<tr valign="middle">
<td align="left"><a href="zlib.configuration.php#ini.zlib.output-compression" class="link">zlib.output_compression</a></td>
<td align="left">"0"</td>
<td align="left">PHP_INI_ALL</td>
<td align="left">Available since PHP 4.0.5.</td>
</tr>
<tr valign="middle">
<td align="left"><a href="zlib.configuration.php#ini.zlib.output-compression-level" class="link">zlib.output_compression_level</a></td>
<td align="left">"-1"</td>
<td align="left">PHP_INI_ALL</td>
<td align="left">Available since PHP 4.3.0.</td>
</tr>
<tr valign="middle">
<td align="left"><a href="zlib.configuration.php#ini.zlib.output-handler" class="link">zlib.output_handler</a></td>
<td align="left">""</td>
<td align="left">PHP_INI_ALL</td>
<td align="left">Available since PHP 4.3.0.</td>
</tr>
</tbody>
</table>
<p>
For further details and definitions of the
PHP_INI_* modes, see the <a href="configuration.changes.modes.php" class="xref">Where a configuration setting may be set</a>.
</p>
<p class="para">Here's a short explanation of
the configuration directives.</p>
<p class="para">
</p><dl>
<dt id="ini.zlib.output-compression" class="varlistentry">
<span class="term">
<i><tt class="parameter">zlib.output_compression</tt></i>
<a href="language.types.boolean.php" class="type boolean">boolean</a>/<a href="language.types.integer.php" class="type integer">integer</a>
</span>
</dt><dd class="listitem">
<p class="para">
Whether to transparently compress pages. If this option is set
to "On" in <var class="filename">php.ini</var> or the Apache configuration, pages are
compressed if the browser sends an "Accept-Encoding: gzip" or
"deflate" header. "Content-Encoding: gzip" (respectively
"deflate") and "Vary: Accept-Encoding" headers are added to
the output.
In runtime, it can be set only before sending any output.
</p>
<p class="para">
This option also accepts integer values instead of boolean
"On"/"Off", using this you can set the output buffer size
(default is 4KB).
</p>
<blockquote><p><b class="note">Note</b>:
<a href="outcontrol.configuration.php#ini.output-handler" class="link">output_handler</a> must be
empty if this is set 'On' ! Instead you must use <i>zlib.output_handler</i>.
<br />
</p></blockquote>
</dd>
<dt id="ini.zlib.output-compression-level" class="varlistentry">
<span class="term">
<i><tt class="parameter">zlib.output_compression_level</tt></i>
<a href="language.types.integer.php" class="type integer">integer</a>
</span>
</dt><dd class="listitem">
<p class="para">
Compression level used for transparent output compression. Specify a
value between 0 (no compression) to 9 (most compression). The default
value, -1, lets the server decide which level to use.
</p>
</dd>
<dt id="ini.zlib.output-handler" class="varlistentry">
<span class="term">
<i><tt class="parameter">zlib.output_handler</tt></i>
<a href="language.types.string.php" class="type string">string</a>
</span>
</dt><dd class="listitem">
<p class="para">
You cannot specify additional output handlers if zlib.output_compression
is activated here. This setting does the same as <a href="outcontrol.configuration.php#ini.output-handler" class="link">
output_handler</a> but in a different order.
</p>
</dd>
</dl>
<p>
</p>
</div><?php manual_footer(); ?>