Is this any help?

http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_rflush_

I'm not sure off hand if $r->print() and print behave differently with
regards to flushing.  There's a thread in the archive talking about this
stuff. (http://marc.info/?t=112557954800001&r=1&w=2) but it doesn't seem
to offer any resolution.  It does note that if you're running output
filters they could potentially break flushing.

Adam

-----Original Message-----
From: FreiZz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2007 2:49 PM
To: modperl@perl.apache.org
Cc: FreiZz
Subject: $|=1 not responding

Hi,

  I've been looking around all over for an answer, no luck yet. Maybe
people from this list can help me.

I upgraded my server from an old distro(apache 1.3+mod_perl 1.x) to a
centos5(apache 2.2 + mod_perl 2.x). It seems that $|=1; is not doing
what it should do.

The code : 



#!/usr/bin/perl 
print "Content-Type: text/html\n\n"; 
print "---($|)"; 
local $|=1; 
print "---($|)"; 
print "1....2..."; 
sleep 5; 
print "3....4..."; 
print "---($|)";

The output : 
<wait 5 seconds>---(0)---(1)1....2...3....4...---(1)

I should be getting : 
---(0)---(1)1....2...<wait 5 seconds>3....4...---(1)

Server : 
- CentOS release 5 (Final) 
- mod_perl-2.0.2-6.3.el5 
- httpd-2.2.3-7.el5.centos 
Conf: 
<Directory /some/directory> 
SetHandler perl-script 
PerlResponseHandler ModPerl::RegistryPrefork 
Options +ExecCGI 
PerlOptions +ParseHeaders 
Options FollowSymLinks ExecCGI 
</Directory>




Any hints ?

Thanx in advance.

FreiZz

Reply via email to