in reply to Re^5: Failed System/Exec Call under Right Permission with CGI
in thread Failed System/Exec Call under Right Permission with CGI
And the system call is as follows:#!/usr/bin/perl -w my $text = $ARGV[0]; my $OUTFILE_file_name = $ARGV[1]; # output file name open ( OUTFILE, '>', $OUTFILE_file_name ) or die "$0 : failed to open output file $OUTFILE_file_name : $!\n" +; print OUTFILE "THIS IS YOUR INPUT TEXT: $text\n"; close ( OUTFILE ); # close output file
But when I run it. It gives this as output in the browser:my @args = ( # This is line 54 '/home/myname/public_html/MyTest/prn_to_file.pl', $param1, '/home/myname/public_html/MyTest/results/output.txt' ); system(@args) == 0 or die "Code does not work $!";
Testing System/Exec function with CGI This text _should_ be printed to the file : foo bar Software error: Code does not work Bad file descriptor at /home/myname/public_html/MyT +est/cgi-bin/test.cgi line 54. For help, please send mail to the webmaster (webmaster@cheers.com), gi +ving this error message and the time and date of the error.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Failed System/Exec Call under Right Permission with CGI
by McDarren (Abbot) on Jul 20, 2006 at 04:07 UTC | |
by neversaint (Deacon) on Jul 20, 2006 at 05:57 UTC | |
by whio (Beadle) on Jul 20, 2006 at 21:16 UTC | |
by Hue-Bond (Priest) on Jul 20, 2006 at 21:30 UTC |