View Single Post
  #1  
Old 09-10-2009, 11:14 AM
28122008 28122008 is offline
Member
 
Join Date: Dec 2008
Posts: 13
Question Gzip output script works with Perl-CGI but gives error with Perl-FCGI..

Hi there,

I was trying to install popular perl based forum YaBB on a Litespeed installation. It worked well when I was running Perl in CGI mode but started giving blank pages when I switched to FCGI using lsperld. After some debugging I found out that its the GZIP code which is causing this and wrote a simple script to reproduce the error:

Code:
#!/usr/bin/perl --

$output = "Hello World.";
open(GZIP, "| gzip -f");
$| = 1;

print "Content-Encoding: gzip\nContent-type: text/html\n\n";
print GZIP $output;
close(GZIP);
exit;
This script works fine and outputs "Hello World." correctly in browser in CGI mode. But when switching to FCGI, it shows all blank and I can see "gzip: stdout: Bad file descriptor" in stderr.log

Is there anyway to rectify this?

-Regards,
Akash
Reply With Quote