Current location: Hot Scripts Forums » Programming Languages » Perl » Perl FormMail Problem

Perl FormMail Problem

Reply
  #1 (permalink)  
Old 03-03-05, 01:26 PM
ennanguyen2002 ennanguyen2002 is offline
New Member
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Perl FormMail Problem

Daer all,

I'm having some problems getting my feedback form using perl to work. Here are my files:

1. FormMail.pl - I only pasted what I have edited:

$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = '';
@referers = qw(249collision.com);
@allow_mail_to = qw(mymail@mymail.com);
@recipients = ();
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER

and so on...

Note: I have changed the permission for the file when I uploaded on the ftp site also it was an ASCII upload.


2. My feedback form (http://www.249collision.com/home/techQues.htm):

<FORM
action="http://www.249collision.com/cgi-bin/FormMail.pl"
method="POST" name="TechQues" id="TechQues">
<DIV align=left></DIV>
<FONT
face="Verdana, Arial, Helvetica, sans-serif" size=2>
<INPUT name=recipient type=hidden id="recipient"
value=mymail@mymail.com>
<INPUT name=subject type=hidden id="subject"
value="Technical Question">
<INPUT
name=redirect type=hidden id="redirect"
value=www.249collision.com>
<BR>
Your Name<BR>
<INPUT size=30 name=name22>
</FONT>

and so on...

-----

Problem is when the form is submitted there is an error message saying:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

-----

I'm not too sure where I am going wrong. I have found some possible solutions:

1. How the perl file is called - Perl scripts do not require special /cgi-bin/ directory. You can place the Perl and the PHP scripts in any directory you wish.

The path to the Perl is /usr/bin/perl
The path for the Sendmail is: /usr/sbin/sendmail

2. PHP and Perl scripts require permissions so the server can execute them correctly. If you are getting this error than it means that you have not set the correct permissions.
The required permissions are as follows:
PHP scripts - chmod 755 filename.php
Perl scripts - chmod 755 filemane.cgi

3. If problem still persist next solution is, for Perl and CGI scripts the solution is to add '-w' after the Perl path in your Perl script. It will look like this:

#!/usr/bin/perl -w

This will enable 'warnings' in Perl. Some Perl scripts do not run without this option.

Please help. Thank you

Last edited by ennanguyen2002; 03-03-05 at 01:36 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-05-05, 01:58 AM
Chas Chas is offline
Coding Addict
 
Join Date: Oct 2003
Location: California
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
It looks like you got it working, no?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 03-09-05, 05:47 PM
ennanguyen2002 ennanguyen2002 is offline
New Member
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
it is working...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron and Perl problem erikbjork Perl 2 01-19-05 11:58 PM
Perl + IE + Cookies Problem jebusCL Perl 1 12-08-04 01:31 PM
Formmail Problem - Can't use on home computer itseabass Perl 2 11-20-04 11:29 PM
formmail problem gscraper Perl 12 08-27-04 04:06 AM
perl newbie has a problem... fowler23 Perl 3 10-04-03 11:57 PM


All times are GMT -5. The time now is 01:59 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.