SPUG: IPC::Cmd doesn't return I/O when run from apache

Michael R. Wolf MichaelRWolf at att.net
Wed Mar 7 00:02:30 PST 2007

Am I missing something obvious about I/O redirection that's apparent to
Apache folks?

I've got a script (tidy_up.pl) that uses IPC::Cmd to call perltidy like

    C:\Perl\bin\perltidy.BAT -i=4 -nt -se -st  c:/PerlCGI/ugly.pl

It works fine from a DOS command prompt.

Not so from a CGI script.  Well, half not-so.  The script runs before and
after the IPC::Cmd::run() method.  The method returns 1 to indicate success,
but none of the references that are supposed to point to the output are

Should it even be possible to have IPC::Run work in Apache2?  If so, are
there tricks to make sure that IPC::Run::run() gets connected to capture my

I'm running ActivePerl 5.8.8 and IPC::Cmd v0.36.

Does this line in the apache error log have any significance?
[Tue Mar 06 23:55:21 2007] [error] [client] [Tue Mar  6 23:55:19
2007] tidy_up.pl: Set up gcc environment - 3.4.4 (cygming special, gdc 0.12,
using dmd 0.125), referer: http://localhost/perlcgi/dir.pl

After 4 hours' hacking, I'm tapped out.  Any fresh ideas?

Michael R. Wolf
    All mammals learn by playing!
        MichaelRWolf at att.net

More information about the spug-list mailing list