100 users online (1 members and 99 guests)  

  Results 1 to 2 of 2


  1. Replies: 0
  2. Replies: 0
  3. Replies: 2
  4. js script that doesn't work ???    Forum: Javascript Forum
    Replies: 1
  5. Apache Server Software?    Forum: General Discussion
    Replies: 3
  1. #1
    shahyar7's Avatar
    New User

    Join Date
    Feb 2007

    Turning off buffering ($=1) doesn't work on Apache server

    Hello all

    I used the code below to turn off the buffering but it doesn't work. When I call the code from the browser it supposed to show START at first and then wait for 5 seconds and then show END. But the browser doesn't display anything for 5 seconds and then show START and END at the same time. When I tested the code on a Windows based system it works great but it works as I said on Apache server. Also the code works great at the command line. Does any body knows what the problem is?

    use strict;
    $| = 1;
    print "Content-type: text/html\n\n";
    print "<html><head></head><body>";
    print "START\n";
    sleep 5;
    print "End\n";
    print "</body></html>\n";
    My Perl version is: 5.8.0
    My Apache version is: 1.3.37 (Unix)

    Thank you all.
    Last edited by DeadMeatGF; 02-27-2007 at 09:39 AM. Reason: Added Code tags

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Join Date
    Feb 2005

    Re: Turning off buffering ($=1) doesn't work on Apache server

    I seggest you make sure your apache settings are correct. Look up on info about output buffering in the apache settings. usually web systems flush on 4096 bits. Also make sure you are sending the correct headers, some browsers wont show anything util it gets it all if you have the wrong headers are sent. Also make sure that apache isnt gz'ing it.

Tags for this Thread