Item9984: does not work under FastCGI

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: GenPDFAddOn
Branches: trunk
Reported By: AntonioTerceiro
Waiting For:
Last Change By: SvenDowideit
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

 

ItemTemplate edit

Summary does not work under FastCGI
ReportedBy AntonioTerceiro
Codebase 1.1.8
SVN Range
AppliesTo Extension
Component GenPDFAddOn
Priority Urgent
CurrentState Closed
WaitingFor
Checkins GenPDFAddOn:db611e6a5e85
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins GenPDFAddOn:db611e6a5e85
Release01x01Checkins
I Attachment Action Size Date Who Comment
GenPDFAddOn.patchpatch GenPDFAddOn.patch manage 6 K 16 Mar 2012 - 16:19 DiabJerius Patch to fix operation under Fast CGI
Topic revision: r5 - 04 Aug 2013, SvenDowideit
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy