Hi Ian -

> On 10/21/2010 2:43 PM, Ian Sillitoe wrote:
> >
> > This works under the test server, but throws the following error
> > under FastCGI:
> >
> > |"Can't locate object method "FILENO" via package "FCGI::Stream" at 
> > /home/ian/perl5/lib/perl5/IPC/Run.pm line 1115.

On Thu, 21 Oct 2010 15:29 -0400, "Stuart Watt" <[email protected]>
wrote:
> 
> You may want to check your version of FCGI. There are previous reports
> of related issues, which seem to be an interaction between IPC::*
> modules expectations of standard input/output/error, and FCGI, which
> fakes them. See
> http://www.mail-archive.com/[email protected]/msg16948.html for an
> example. In my FCGI, the FILENO method is present, but this appears to
> have been added in version 0.67_01 on 20 Dec 2009 - this is pretty
> recent and your Perl may not include it.

If you can't upgrade (or upgrading doesn't fix things), you can also do
something like this before the IPC call:

    # HACK HACK HACK
    # Fix for running IPC::Run under FastCGI
    # See: http://www.mail-archive.com/[email protected]/msg16948.html
    #
    unless (exists &FCGI::Stream::FILENO)
    {
        *FCGI::Stream::FILENO = sub { return -2 };
    }


HTH,
Larry

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to