Solved

Newbie Question

Posted on 2001-06-09
2
156 Views
Last Modified: 2012-05-04
Hello,

I'm trying to implement a cgi-mail form to my server.
I have downloaded a script that is very easy to modify AND I have the html form ready to go.  

I've uploaded the .pl file to my cgi-bin.  The mail server is sendmail ..

When trying to process the html form online, I get this message:

[500] Error - Internal Server Error

The script you're trying to access has suffered a fatal error.

Possible Reasons
   
The script you were trying to use is misconfigured in some way, and cannot complete the task as it should.
The server is experiencing some technical problems. You should try again shortly.
 
Debugging Information:

Premature end of script headers: /data1/hm/justafriend.com/cgi-bin/mr.pl  
 
=======================================================

I really don't know perl/cgi.  I just know how to modify the scripts.  Or well ... trying to.  Where do I start to troubleshoot this problem?   It seems that putting these scripts onto my server is relatively easy.  But right now, I'm in the dark.

Thanks! :)
 
0
Comment
Question by:derekdreg
2 Comments
 
LVL 8

Expert Comment

by:shlomoy
ID: 6172774
what does the web-server's error log say?
0
 
LVL 3

Accepted Solution

by:
alien_life_form earned 100 total points
ID: 6172935
Greetings.

Sendmail's just telling you that the script did not finish properly

(by the way how does the mail message get into this loop? who's sending
mail, is it your script? some other contraption at your provider's site?)

If you changed the script, the most probable cause is that you introduced some syntax error while doing so. You may be able to catch it by
running the command perl -wc <your-script-name> from the command
line.

Another possible source of errors is the first line of the script:

#!/usr/bin/perl

should point to the location of the perl interpreter on the isp machine.
If that's the problem, running this should tell you:

#!/usr/bin/perl

$|=1;

print "Content-type: text/plain\n\nHi there\n";
exit 0;

If it des not run, try changing the first line to

#!/usr/local/bin/perl

Better yet ask your provider.

More info should be available in the error log of the server. And posting
the modifications you made to the script might also help.

Cheers,
alf
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question