Loading ...
Sorry, an error occurred while loading the content.

67071Re: [mp2] $| doesn't work with mod_perl

Expand Messages
  • pradeep kumar
    Sep 16, 2005
      Can you please elaborate on why apache filters can be an issue with the autoflush problem that I noticed ?

      Also, I noticed that the autoflush work properly when I flush it to a regular file. Its only when I choose STDOUT that the flushing gets delayed. Is there some buffering that happens with STDOUT alone ? I am confused if this is a modperl problem or an Apache problem.

      On 9/12/05, pradeep kumar <pradeep.smani@... > wrote:
      Hi Tom,
       
      I am using mp2.
       
      Thanks and Regards,
      Pradeep

       
      On 9/12/05, Tom Schindl <tomAtLinux@...> wrote:
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      What version of mp are you using if you are running mp2 i think the
      apache-filter-system is the problem.

      Tom

      pradeep kumar wrote:
      > Hi,
      >
      >  I have a perl script which uses $| to set autoflush on. Basically, it
      > flushes after every print. This script is working fine from the command
      > line when run using standalone perl interpreter. But when the same
      > script is accessed via mod_perl/apache setup, mod_perl is not flushing
      > after every print, instead buffering and printing all output at one shot.
      > Any idea why $| is not working with mod_perl.
      >
      > Here is my sample script:
      >
      > #!/usr/bin/perl -w
      >
      > use CGI qw/:standard/;
      > use strict;
      > select(STDOUT);
      > $| = 1;
      > print STDOUT "Content-type: text/html\n\n"; print STDOUT <<END; <html>
      > <head> </head> <body> END print STDOUT 'hello'; print STDOUT '<br>';
      > sleep(2); print STDOUT 'World'; print STDOUT '<br>'; sleep(2); print
      > STDOUT 'Testing'; print STDOUT "</body></html>";
      >
      >
      > Thanks in advance,
      > Pradeep

      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.4.0 (GNU/Linux)
      Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

      iD8DBQFDJTzSkVPeOFLgZFIRApj0AKCMTBdxV+2QHD3A09oXuZH86Qv1/wCgoSuu
      8w1b1u2xYzy6lZF9XJA3GD8=
      =VjYy
      -----END PGP SIGNATURE-----


    • Show all 12 messages in this topic