in reply to Re^7: mod_perl, prefork mpm and alarms
in thread mod_perl, prefork mpm and alarms

Just posting here for sake of completeness .. after plugging Log::Log4perl in various places, I discovered the fatal error was

Can't locate object method "FILENO" via package "Apache::RequestRec" at /usr/lib/perl5/5.8.0/IPC/Open3.pm line 196

So that means I need to figure out how to solve that problem .. but at least I know what problem I'm trying to solve now.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Replies are listed 'Best First'.
Re^9: mod_perl, prefork mpm and alarms
by perrin (Chancellor) on Nov 30, 2006 at 19:22 UTC
    I think you just need to untie STDIN. See this thread for examples.

      For those interested, the fix that perrin refers to above is as follows:

        Found this somewhere back when this bug first appeared in mod_perl:

        # work-around for mod_perl my $tie_stdin = tied *STDIN; untie *STDIN if $tie_stdin; # insert open2() or open3() statement after the above

        Gerald,

        It is a mod_perl bug, but I would consider putting it in the FAQ. Would probably be very helpful to people.

      I started work on converting the existing code to use IPC::Run, but hadn't finished by the end of the day today .. so I may put that on hold and try this fix instead.

      ++beer!

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      Update: Added clarification in first paragraph as to the source of the fix.

      Well, just tried this fix, and it didn't change the error that pops out.

      I'm still getting

      Can't locate object method "FILENO" via package "Apache::RequestRec" at /usr/lib/perl5/5.8.0/IPC/Open3.pm line 196

      FWIW, STDIN was defined when I unTIEd it, but it made no difference to the behaviour.

      I'll go back to working on the IPC::Run approach now.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

        I'm certain you could get a fix or workaround for this on the mod_perl list if you want one.