Community Documentation

Tuning PHP

Last updated July 31, 2009. Created by MichaleR on August 24, 2003.
Edited by kenorb, moshe weitzman, killes@www.drop.org, Jeremy. Log in to edit this page.

  1. If you have CPU cycles to spare, or if bandwidth is a more constrained resource than CPU cycles, you can add the following to php.ini:

    output_handler = ob_gzhandler

    A comment in php.ini explains:

    "You can redirect all of the output of your scripts to a function. For example, if you set output_handler to 'ob_gzhandler', output will be transparently compressed for browsers that support gzip or deflate encoding. Setting an output handler automatically turns on output buffering."

    This functionality is further described here.

  2. very interesting presentation from a PHP developer
  3. Increase PHP memory limit

Additional resources:

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here