You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Aaron Kennedy <aa...@icr.com.au> on 2001/02/10 13:57:49 UTC

Apache::SubProcess failures

Hi all,

I'm having some issues involving directing the output of system() to the
client.  I'm trying to use Apache::Subprocess to over-ride
system().  However, whenever I use it, I get the following errors in my
Apache error log:

--- test.pl ---

use strict;
use Apache::SubProcess qw(system);

select STDOUT; $| = 1;
print "Content-type: text/html\n\n";
system ("/usr/bin/ls");

--- error.log ---

[Sat Feb 10 22:54:29 2001] [error] fdopen failed! at
/usr/local/lib/perl5/site_perl/5.6.0/i586-linux/Apache/SubProcess.pm line
36.

[Sat Feb 10 22:54:29 2001] [error] (2)No such file or
directory: Apache::SubProcess exec of /usr/bin/ls failed

I'm using Apache version 1.3.17, mod_perl version 1.25 and
Apache::SubProcess version 0.02.  Any help would be greatly appreciated!

Cheers,

Aaron


Re: Apache::SubProcess failures

Posted by Aaron Kennedy <aa...@icr.com.au>.
On Sat, 10 Feb 2001, Steve Reppucci wrote:

> 
> Are you certain that your problem is in the output redirection?  That
> message seems to indicate that the problem is in exec'ing /usr/bin/ls. Are
> you sure that it (ls) exists at that path, rather than just /bin/ls?

I feel kind of embarrassed about the location of ls... yes it was
wrong.  That was just a quick example I bashed up (which
originally used echo which is in that path =).  Still, with the
correct ls path, or that of any other binary, the first error (relating to
fdopen) remains.

Cheers,

Aaron

> > --- test.pl ---
> > 
> > use strict;
> > use Apache::SubProcess qw(system);
> > 
> > select STDOUT; $| = 1;
> > print "Content-type: text/html\n\n";
> > system ("/usr/bin/ls");
> > 
> > --- error.log ---
> > 
> > [Sat Feb 10 22:54:29 2001] [error] fdopen failed! at
> > /usr/local/lib/perl5/site_perl/5.6.0/i586-linux/Apache/SubProcess.pm line
> > 36.
> > 
> > [Sat Feb 10 22:54:29 2001] [error] (2)No such file or
> > directory: Apache::SubProcess exec of /usr/bin/ls failed
> > 
> > I'm using Apache version 1.3.17, mod_perl version 1.25 and
> > Apache::SubProcess version 0.02.  Any help would be greatly appreciated!


Re: Apache::SubProcess failures

Posted by Steve Reppucci <sg...@logsoft.com>.
Are you certain that your problem is in the output redirection?  That
message seems to indicate that the problem is in exec'ing /usr/bin/ls. Are
you sure that it (ls) exists at that path, rather than just /bin/ls?


On Sat, 10 Feb 2001, Aaron Kennedy wrote:

> Hi all,
> 
> I'm having some issues involving directing the output of system() to the
> client.  I'm trying to use Apache::Subprocess to over-ride
> system().  However, whenever I use it, I get the following errors in my
> Apache error log:
> 
> --- test.pl ---
> 
> use strict;
> use Apache::SubProcess qw(system);
> 
> select STDOUT; $| = 1;
> print "Content-type: text/html\n\n";
> system ("/usr/bin/ls");
> 
> --- error.log ---
> 
> [Sat Feb 10 22:54:29 2001] [error] fdopen failed! at
> /usr/local/lib/perl5/site_perl/5.6.0/i586-linux/Apache/SubProcess.pm line
> 36.
> 
> [Sat Feb 10 22:54:29 2001] [error] (2)No such file or
> directory: Apache::SubProcess exec of /usr/bin/ls failed
> 
> I'm using Apache version 1.3.17, mod_perl version 1.25 and
> Apache::SubProcess version 0.02.  Any help would be greatly appreciated!
> 
> Cheers,
> 
> Aaron
> 

=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
Steve Reppucci                                       sgr@logsoft.com |
Logical Choice Software                          http://logsoft.com/ |