Re: does php buffer output?
| From: | Rasmus Lerdorf | Date: | Thu, 29 Jun 2000 06:45:53 +0000 |
| Subject: | Re: does php buffer output? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3739@lists.php.net to get a copy of this message | ||
> Ok heres a simple question I can't seem to find an awnser to. Does php place
> output into a buffer of N size before it sends it back to client? If this is
> so, if an error is generated in the script, will the output buffer be
> destroyed (no data goes back to client) or will it be flushed of current
> content. Also, what is the max size of that buffer (default), or at what
> size will the buffer be flushed, and if all of this is possible, could one
> specify max buffer size, is it in a properties file, or could one specify
> this page to page. Thanks everyone,
By default PHP does not do any output buffering. Apache buffers until it
has a full TCP packet to send though. The PHP flush() call asks Apache
nicely to flush this buffer, but you are better off avoiding this if you
want to optimize your bandwidth.
PHP 4 does have an output buffering feature that you can optionally turn
on.
-Rasmus