Re: beginner here - with basic cgi trouble
"Brett W. McCoy" wrote: > > On Tue, 8 May 2001, Chip Wiegand wrote: > > > - server log - > > [error](2)No such file or directory. exec of /usr/local/apache/cgi-bin/ > > formparser.cgi failed > > [error][192.168.1.8] Premature end of script headers: /usr/local/apache/ > > cgi-bin/formparser.cgi > > - I see the file DOES exist as formparser.cgi in the directory path shown > > in the errors. > > - I run perl -c formparser.cgi and get the response Syntax OK > > It seems to me that the problem isn't that it can't find formparser.cgi, > but there is some other file that formparser.cgi depends on to run that > can't be found (the perl executable perhaps?). Checking the syntax isn't > enough -- you need to see if the program will *run*. If it's executable, > you should be able to at least do ./formparser.cgi and see where it's > failing. > > -- Brett >http://www.chapelperilous.net/btfwk/ > > Gibble, Gobble, we ACCEPT YOU ... Chip, Briet is right. But also do perl -d ./formpargser.cgi that will put you in debug state and should bring up a prompt. See below: Loading DB routines from perl5db.pl version 1.0402 Emacs support available. Enter h or `h h' for help. main::(suggestion.cgi:6): $mailprog = '/usr/lib/sendmail'; DB<1> The DB<1> is a prompt and by type and N means to step thru the code watch it execute. That may also help trouble shoot the problem further. -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** "Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac." - George Carlin***
Using Email
Hi, Anyone with experience in having perl call up mailx and at the same time have the body of the messages sent along with attachment. -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** "Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac." - George Carlin***
Subroutine and Functions
Hi, I like to know if subroutines and Function should be placed in any particular order in perl. What is commonly practiced? Can anyone give me some examples. -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** "Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac." - George Carlin***
Error
Hi, I'm getting the following errror: Global symbol "$fh" requires explicit package name at livonia.pl line 22. Execution of livonia.pl aborted due to compilation errors. Also can some one suggest a better way to handle the IO I'm wondering about the globtype and that is why I used the \*FH in my subroutine. Below is the code: #!/usr/bin/perl # Modules use strict; use Text::CSV_XS; use FileHandle; # Constants my $datafile = 'everyone.csv'; #my $summary = 'summary.txt'; #open $handle, "$datafile" or die "$datafile: $!"; sub newopen { my $path = shift; local *FH; open (FH, $path) || return undef; return \*FH; } $fh = newopen("$datafile"); my $csv = Text::CSV_XS->new; my $column = ''; if ($csv->parse($fh)) { my @field = $csv->fields; my $count = 0; for $column (@field) { print ++$count, " => ", $column, "\n"; } print "\n"; } else { my $err = $csv->error_input; print "parse() failed on argument: ", $err, "\n"; } my @sample_input_fields = ('You said, "Hello!"', 5.67, 'Surely', '', '3.14159'); if ($csv->combine(@sample_input_fields)) { my $string = $csv->string; print $string, "\n"; } else { my $err = $csv->error_input; print "combine() failed on argument: ", $err, "\n"; } #close(INFILE); #close(OUTFILE); -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** "Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac." - George Carlin***
CPAN Question
Hi, Sometime back some one gave me the path to a config file in which told cpan where and what compilers that my systems uses. Does anyone have any ideas to this. I get this error: /usr/ucb/cc: language optional software package not installed That is because I'm not using cc but gcc instead and I have the CC environment variable set to gcc. Thanks in advance for helping. -- *** Phillip B. Bruce *** *** http://pbbruce.home.mindspring.com *** *** [EMAIL PROTECTED] *** *** *** *** "Have you ever noticed? Anybody going slower than*** *** you is an idiot, and anyone going faster than you*** *** is a maniac." - George Carlin***