It can depend upon a couple of things. May moons ago I tried to get buffering to work properly under Apache. I could never get it to go. Then, at one point we upgraded to newer version of Apache, and suddenly the buffering began to work just as you wanted above. I think the version change was right around the move from a 1.2 Apache to a 1.3 something Apache. All new versions of Apache seem to work fine.

Newer versions of Apache will do the buffering correctly, but they will do it different from the command line. On the command line, any character sent shows up. In Apache, you need to send it a newline before the buffer is flushed. However, even if the buffer is flushed, that doesn't mean it will show up. If you look at your browser's status, you will see the size of the document get bigger. Sending a newline to the browser is not enough for it to show output. What you will need to do to make a line of text to show up is to include a <br> or <p> or something that will signal the end of a line so that the browser is then able to render it. So make sure each of your lines is properly terminated with a <br>\n and all will be well with your buffering.

In reply to Re: (OT?) Output buffering w/Apache by Rhandom
in thread (OT?) Output buffering w/Apache by voyager

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.