Item9984: does not work under FastCGI
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: GenPDFAddOn
Branches: trunk
When trying to generate PDF from the extension topic (
http://localhost:8080/bin/genpdf/System/GenPDFAddOnPlugin), it fails with:
Not a GLOB reference at /usr/lib/perl5/FCGI.pm line 125.
My environment is
./tools/lighttpd.pl -f
. Without
-f
, it works (in that case the
genpdf
script is called directly)
--
AntonioTerceiro - 09 Nov 2010
I've attached a patch which corrects this problem (against $Rev: 7410 (2010-05-14) $).
viewPDF()
redirects
STDERR
which causes FCGI conniptions. There was one explicit print to STDERR in the code, (dumping an Error::Simple object) but I believe that this is unnecessary as exceptions are already being handled upstream by the Engine. Also,
htmldoc's
STDERR
is caught by Sandbox, so it shouldn't be needed for that.
I've taken the opportunity to enhance error checking (still more to be done; all file i/o should be error checked in case we run out of disk space).
--
DiabJerius - 16 Mar 2012
Wow, still not fixed?
Apparently. The problem still exists in Foswiki 1.1.8...
Setting state to "urgent", as the functionality is broken when using fcgi, which is recommended for anyone who needs speed.
--
PhilippLeufke - 24 May 2013
As a workaround, genpdf can be served by standard cgi rather than fcgi, just like
configure
. In my case this is done by these two entries in the apache config at the appropriate places:
Alias /bin/genpdf "/var/www/foswiki/bin/genpdf"
[...]
<Files "genpdf">
SetHandler cgi-script
</Files>
--
PhilippLeufke - 24 May 2013
I've released this in 1.3
--
SvenDowideit - 03 Aug 2013