PDA

View Full Version : Application error w/ nms formmail...help!


Ray_Bman
02-24-2003, 05:52 AM
Hi, hope you can help.

I am using nms_formmail and have been getting this message:

APPLICATION ERROR

An error has occurred in the program

close sendmail pipe failed, mailprog=[/usr/sbin/sendmail -oi -t] at /var/www/cgi/processor2.cgi line 646

Note: I renamed formmail to processor2, just to help with securtiy.
I went to line 646, I think I counted correctly, but don't know what to look for.
Any suggestions?
Thanks in advance,
Ray
www.brotherhoodmusic.com

Below is my config. settings for perl and code for form:

USER CONFIGURATION SECTION

# --------------------------

# Modify these to your own settings. You might have to

# contact your system administrator if you do not run

# your own web server. If the purpose of these

# parameters seems unclear, please see the README file.

#

BEGIN

{

$DEBUGGING = 1;

$emulate_matts_code= 1;

$secure = 1;

$allow_empty_ref = 1;

$max_recipients = 2;

$mailprog = '/usr/sbin/sendmail -oi -t';

$postmaster = 'webadmin@brotherhoodmusic.com';

@referers = qw(www.brotherhoodmusic.com);

@allow_mail_to = qw(brotherhoodmusic@attbi.com);

@recipients = ();

%recipient_alias = ();

@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);

$locale = '';

$charset = 'iso-8859-1';

$date_fmt = '%A, %B %d, %Y at %H:%M:%S';

$style = '0';

$no_content = 0;

$double_spacing = 1;

$wrap_text = 0;

$wrap_style = 1;

$send_confirmation_mail = 0;

$confirmation_text = <<'END_OF_CONFIRMATION';

Wrom: VOTQNQEMSFDULHP

Subject: form submission
-------------------------------------------------------------
Code for Form:

<form action="/cgi-bin/processor2.cgi" method="post" enctype="multipart/form-data" name="form1" target="_self">
<input type="hidden" name="recipient" value="brotherhoodmusic@attbi.com">
<input type="hidden" name="subject" value="Band Mail">
<input type="hidden" name="required" value="realname,email">
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="10" id="FormTable">
<tr>
<td width="31%"><label><strong><font face="Arial, Helvetica, sans-serif">Your Name:</font></strong></label>
<font face="Arial, Helvetica, sans-serif"> <strong>&nbsp;</strong></font></td>
<td width="69%" valign="top">
<div align="left">
<input name="realname" type="text" size="35">
</div></td>
</tr>
<tr>
<td><label><font face="Arial, Helvetica, sans-serif"><strong>E-mail Address:</strong></font></label> <strong> <font face="Arial, Helvetica, sans-serif">&nbsp;</font></strong></td>
<td valign="bottom">
<div align="left">
<input name="email" type="text" id="email" size="45" maxlength="45">
</div></td>
</tr>
<tr>
<td valign="middle"><font face="Arial, Helvetica, sans-serif"><strong>Comments: (optional)</strong></font></td>
<td valign="bottom">
<div align="left">
<textarea name="comments" type="text" cols="45" rows="12"></textarea>
</div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<div align="left">
<input name="Submit" type="submit" onClick="MM_validateForm('realname','','R','email','','RisEmail');return document.MM_returnValue" value="Submit">
<input name="Reset" type="reset" id="Reset" value="Reset">
<input type="hidden" name="redirect" value="http://brotherhoodmusic.com/MainPage.htm"> </div></td>
</tr>
</table>
</form>

ACJavascript
02-25-2003, 05:05 PM
Can you give us the code for line 646

Ray_Bman
02-25-2003, 05:19 PM
Hi,
Thanks for the reply

Here is the code from the Formmail Perl script, lines 640-647

---Line 640 here---
sub email_end {
if (defined $smtp) {
smtp_command(".");
smtp_command("QUIT");
undef $smtp;
} else {
close SENDMAIL or die "close sendmail pipe failed, mailprog=[$mailprog]";
---Line 648 here----

This in the nms_formmail script.

I am not using SMTP, using Sendmail that is on server. Permissions for Sendmail are set to CHMOD 777

ACJavascript
03-01-2003, 02:45 AM
I havn't really had the chance yet to play with sendmail on the server.. So mmm,, but I have some ideas lol :D

try these mabye I we will get lucky :D

Remove the -oi in the mialprog

or

ad |/usr/sbin/sendmail

it says pipline error so mabye you need a pipe charcter like in SMTP

Well I have no clue if they will work hehe :D

Ray_Bman
03-01-2003, 06:46 AM
AC,

Tried both of those options and even tried using both changes at the same time, but get the same Error message mentioned earlier.

I'm at a loss here, any thoughts?

Ray

ACJavascript
03-01-2003, 06:10 PM
undef $smtp;

I noticed that part,, If im not mistaken hehe that leads to a sub in the script.. Can you post the sub ? mabye the error is in there,, And is sending the error to the pipe mail like the error said

Ray_Bman
03-01-2003, 06:42 PM
I'm not sure which Sub to send, so attached is the script, hope you can see something.

Thanks again,
Ray

ACJavascript
03-01-2003, 06:51 PM
THis might be somthing and it might not be but in the sub email like i said i found this

email_data($xheader . <<EOMAIL);
To: $checked_recipient
Wrom: LHPQQWOYIYZUNNY
Subject: $subject


---

To is correct
but Wrom --- Its should be From right


Just a thought

Ray_Bman
03-01-2003, 07:16 PM
Strange, this (below) is what is in the original script that is on the server, I double checked it, too.
Some how the attachment has it different, strange.
So, that could not be the problem


email_data($xheader . <<EOMAIL);
To: $checked_recipient
Wrom: NNYCGPKYLEJGDGV
Subject: $subject

Ray

Ray_Bman
03-05-2003, 02:54 AM
Maybe something can be made of the Error message in the maillog.
Here it is:

Mar 4 19:12:15 brotherhoodmusic sendmail[9899]: h250CFf09899: SYSERR(apache): Can't create transcript file ./xfh250CFf09899: Permission denied
Mar 4 19:12:15 brotherhoodmusic sendmail[9899]: h250CFf09899: Authentication-Warning: brotherhoodmusic.com: apache set sender to webadmin@brotherhoodmusic.com using -f
Mar 4 19:12:15 brotherhoodmusic sendmail[9899]: h250CFf09899: SYSERR(apache): Cannot create ./dfh250CFf09899: Permission denied
Mar 4 19:12:15 brotherhoodmusic sendmail[9899]: h250CFf09899: from=webadmin@brotherhoodmusic.com, size=0, class=0, nrcpts=0, relay=apache@localhost

Thanks for any advice,
Ray

ACJavascript
03-05-2003, 02:56 AM
Sorry bman,, Havn't posted latly,, been really busy,, I will be looking over the script again latter today

Ray_Bman
03-05-2003, 02:59 AM
Hey AC,

No problem, really appriciate the efforts,
Thanks,

Ray:)

Saj
03-05-2003, 04:40 PM
If you got it from scriptarchive.com, then it comes as a pl file. Just checking, did you change the extension out of a text editor??

Also, I thought cgi scripts had to be chmodded 755... Thats what I did and it worked fine for me.

Ray_Bman
03-05-2003, 05:29 PM
I got the script Wrom: BGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZO
I edited it in Word Pad and uploaded in ASCII and Chmod to 755.
Of course all proper config changes were done as per the ReadMe file.
I don't know what else to do:confused:

Ray

Ray_Bman
03-05-2003, 05:32 PM
Wow, what is going on here?

That address is:

http://nms-cgi.sourceforge.net/scripts.shtml

hmm, why did that happen? Oh well, hope it goes through this time.

Ray