perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Femi Oshagbemi" <>
Date Wed, 09 Feb 2005 15:34:56 GMT
Hello, im very new to perl, modperl and apache but im doing a university 
project to use modperl to provide a connection to a localised Gnu Octave 

I have come against a problem when trying to run this simple test program:-

package Apache::OctavePrototype;

use FileHandle;
use IPC::Open2;
use Apache::Const -compile => ':common';
use Apache::Request;
use Apache::Process;
use Apache::Upload;

sub handler {

    my $r = Apache::Request->new(shift);
    my $octave_cmd = $r->param('octave_cmd') || 'No Command';
    my $output_text;

	my $pid = open2( \*ReaderFH, \*WriterFH, "sh.exe -e /bin/");

	for (1..11)
		$read = <ReaderFH>;
		$output_text = $output_text.$read;


	return OK;


I get an error generated in the apache error log file:-

C:/Perl/site/lib/Apache2/Apache/ line 19\n
[Wed Feb 09 13:25:34 2005] [error] [client] open2: Can't close: No 
such file or directory at

Traced to the lines in the IPC:Open3 module :-

foreach $fd (@$fds) {
	$fd->{handle}->fdopen($fd->{tmp_copy}, $fd->{mode});
	$fd->{tmp_copy}->close or croak "Can't close: $!";

Im using a perl/apache binary - Perl-5.8-win32-bin.exe downloaded form and windows xp.

Anyone with any help or ideas please let me know

thanks in advance

View raw message