Re: CGI Error
hmmm... that means something is wrong with Apache, suEXEC, or Perl 5.004.
Do I need any special perl libs/files for cgi?
I've been able to run files which use sh (bash) and awk fine.. so I think
there is something wrong w/ perl.
Thanks
Paul
On Sun, 7 Dec 1997, Troy wrote:
> It works (as is) on my machine. I have attched the _exact_ file I
> ran.
>
> I am using apache, I put this file in the cgi-bin directory with
> permissions of 755
>
> Hope this helps.
> troy
>
> Paul Miller wrote:
> >
> > On Sun, 7 Dec 1997, Troy wrote:
> >
> > > Paul Miller wrote:
> > >
> > > > ***
> > > > Internal Server Error
> > > > This is the top line of my input:
> > > >
> > > > #! /usr/bin/perl
> > >
> > > If this is exact, it won't work. There can't be a space between the
> > > ! and the path.
> > >
> > > try:
> > >
> > > #!/usr/bin/perl
> > >
> > > If this is the way it looks, it should work. Try just running the
> > > script at the command line and see what the error is (don't type
> > > perl -c <scriptname>, just <scriptname>)
> >
> > Here is the script. It runs fine at the command line, but Apache doesn't
> > like it.. (I didn't write this script - I don't know perl)..
> >
> > ---
> > #!/usr/bin/perl
> > read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
> > @pairs=split(/&/,$temp);
> > foreach $item(@pairs)
> > {
> > ($key,$content)=split(/=/,$item,2);
> > $content=~tr/+/ /;
> > $content=~s/%(..)/pack("c",hex($1))/ge;
> > $fields{$key}=$content;
> > }
> > print "Content-type: text/html\n\n";
> > print "<HTML>\n";
> > print "<BODY BGCOLOR=#FFFFFF>\n";
> > print "<CENTER>\n";
> > print "THANK YOU<BR>\n";
> > print "$fields{fname} $fields{lname}</BR>";
> > print "I will write<BR>\n";
> > print "you at<BR>\n";
> > print "$fields{email}<BR>\n";
> > print "</CENTER>\n";
> > print "</BODY></HTML>";
> > ---
> >
> > Here is something I found in the error.log
> >
> > error.log: "[error] Premature end of script headers"
> >
> > (before I was only looking in the cgi.log, which didn't give any errors)
> >
> > any ideas?
> >
> > Thanks
> > Paul
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: