I'm displaying a "wait page" while the script is doing it's thing.
Used to work fine, but not anymore, under Apache 2.2/mod_perl.
Instead of Start-DisplayWaitPage-workworkwork-DisplayResult, I get Start-workworkwor-DisplayWaitPage-DispayResult... In play words... I stare at a blank page for 20 seconds as opposed to a beatifull "please wait" web page...
The html is identical across setups.
It's as if the apache is trying to compress the result page (therefore waiting for the end of the script before displaying anything)... But no compression is performed.
Please Help
Thanx
FreiZz
$¦=1; is at the beginning of the script (and the subject of this post)...
I've tried many things...
I've checked the headers on the response and it is not compressed or anything.
There is no apparent reason why apache is waiting on the end of the script to send the output...
The same code works with apache2 (no mod_perl)...
It's basically:
print blabal... do your stuff... print refresh.. print result...
FreiZz
Spew out \n characters, 512 of them at least, after the wait page. In general, you can never send enough \n characters.
You need to sometimes manually overflow various levels of buffering to get your wait page out, so good luck!
I even tried to 512+ \n to fill the buffer and all.. but nothing... here is more details :
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>
FreiZz
[edited by: jatar_k at 6:21 pm (utc) on Oct. 3, 2007]
[edit reason] disabled smilies [/edit]