LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > CGI/Perl/Python > Gzip output script works with Perl-CGI but gives error with Perl-FCGI..

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:56 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.