downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

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">&quot;0&quot;</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">&quot;-1&quot;</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">&quot;&quot;</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&#039;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 &quot;On&quot; in <var class="filename">php.ini</var> or the Apache configuration, pages are
     compressed if the browser sends an &quot;Accept-Encoding: gzip&quot; or
     &quot;deflate&quot; header. &quot;Content-Encoding: gzip&quot; (respectively
     &quot;deflate&quot;) and &quot;Vary: Accept-Encoding&quot; 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
     &quot;On&quot;/&quot;Off&quot;, 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 &#039;On&#039; ! 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(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites