Solved

SendMail CGI script not working

Posted on 2007-04-10
5
413 Views
Last Modified: 2016-10-08
I am testing a site currently in our prototype development area.  Once it tests clean we can move it into production.  Its running on RedHat/Apache
But right now there is a contact form that is not working.
If you go to: http://rh.magpieprototype.com/morphosisstudio.com and click on the [Submit Email Address] button you will see the error.
Here is the CGI script "cwmmail.cgi":  http://hhe.cc/download/cwmmail.txt
Sendmail is located at: /usr/lib/sendmail
Perl is located at: /usr/local/bin/perl

Let me know if you have any ideas or require more information.

Thank you in advance.
0
Comment
Question by:Cappper
5 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
ID: 18885969
I certainly wouldn't recommend running that code you have.  It has some very clunky constructs and out of date CGI parsing methods.

But, disregarding that, the most likely cause of the error is the script either has Windows end of line characters and/or missing execute permission.

If you add:

use CGI::Carp 'fatalsToBrowser';

at the top of the script, you'll either see the actual error, or if you still get a "500 internal server" error, it means something fundamental is wrong with the script, eg: permissions, path to perl, etc.
0
 
LVL 27

Assisted Solution

by:Nopius
Nopius earned 250 total points
ID: 18886228
Cappper, just look into apache error_log (if you have access to) and copy-paste related errors here.
0
 
LVL 1

Author Comment

by:Cappper
ID: 18891438
The script was not designed by myself or our company.  But instead of spending time troubleshooting the issue we are just going to re-write it.

Thanks for your help.
0
 

Expert Comment

by:lin ling
ID: 41834748
hai ejjfa  zjrjf  zjefja f f
0
 

Expert Comment

by:aite jajfj
ID: 41834751
gskgk xkrk gksolg xkrgk 123
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 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