Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 24, 2012, 01:43:33 AM

Pages: [1]   Go Down
  Print  
Author Topic: CGI E-Mail  (Read 450 times)
Pogostick
Newbie
*
Offline Offline

Posts: 3


WWW
« on: February 11, 2003, 08:09:00 AM »

Ok I've been trying to set up a form using cgi email but I keep getting a server 500 error? You can see the page at:

http://www.tstyprs.com/test.htm

Any one have any ideas?
Logged
JamesYap
Intergalactic Superstar
*****
Offline Offline

Posts: 167



WWW
« Reply #1 on: February 11, 2003, 12:13:00 PM »

There are many possible errors but I think for your is your action attribute in your file, which point to:

http://www.tstyprs.com/cgi-bin/cgiemail/mail.txt

this is a .txt file instead of a .cgi or .pl file. A program much end with a .cgi or .pl.

I suggest you to find a PHP script to use if your need is just simple emailing. Look in phpscripts.com. PHP are more easy to configure and use as compare to CGI/Perl.
Logged

Why LunarPages is the best web hosting? Read our LunarPages Review to find out now.
s102r18
Spacescooter Operator
*****
Offline Offline

Posts: 38


WWW
« Reply #2 on: February 11, 2003, 01:59:00 PM »

quote:
Originally posted by Pogostick:
Ok I've been trying to set up a form using cgi email but I keep getting a server 500 error?

Is cgiemail installed in your cgi-bin subdirectory?  Did you set the correct permissions for it?

There is nothing wrong with your test.htm form, your mail.txt file, or the command you used in the form action, so the problem is almost surely in cgiemail not being installed, or the permissions not being set correctly.

There are some oddities in your test; you request an Email address and then use the answer as the person's name, but that won't stop the form from working.  And I would suggest putting the template in your _private directory instead of the root.  (Change the form action to reflect the new location if you do that.)

I duplicated your test.htm and your mail.txt file, changing them only to use my cgiemail and my address, and they worked fine.   Try it yourself (I've changed it back to the Email address you specified in mail.txt).

James, the mail.txt is a template, not an executable.  It doesn't have to be a .cgi or .pl file, and it doesn't have to be in the cgi-bin subdirectory.
Logged
JamesYap
Intergalactic Superstar
*****
Offline Offline

Posts: 167



WWW
« Reply #3 on: February 11, 2003, 08:09:00 PM »

I am referring to the .txt in the .htm (template). The http://www.tstyprs.com/test.htm is trying to execute http://www.tstyprs.com/cgi-bin/cgiemail/mail.txt as an execution file. I see this with view source of the .htm file.
 
 [ February 12, 2003, 04:12 AM: Message edited by: JamesY ]
Logged

Why LunarPages is the best web hosting? Read our LunarPages Review to find out now.
s102r18
Spacescooter Operator
*****
Offline Offline

Posts: 38


WWW
« Reply #4 on: February 12, 2003, 01:31:00 AM »

quote:
I am referring to the .txt in the .htm (template).
The test.htm is not the template, it is the html form where the data is input by the user.  "mail.txt" is the template.

 
quote:
The "http://www.tstyprs.com/test.htm" is trying to execute "http://www.tstyprs.com/cgi-bin/cgiemail/mail.txt"
I know that is what it looks like at first glance, but that is not what is happening.  It is the correct format for calling cgiemail.  The executable (cgiemail) takes everything after "cgiemail" as the parameter that tells it where to find the template file to create the Email (or everything after "cgiemail/"; I forget whether the parameter starts with or right after the "/" but a call to cgi-bin/mail.txt works with mail.txt in the public_html folder).  The format is explained in the CPanel Help information and in the online documentation of cgiemail.  It is confusing if you haven't used it before, but that is how it works.
Logged
JamesYap
Intergalactic Superstar
*****
Offline Offline

Posts: 167



WWW
« Reply #5 on: February 12, 2003, 09:52:00 AM »

Wow, you are right and I just check the manual. Quite weird for me to see it but it is really there!
Logged

Why LunarPages is the best web hosting? Read our LunarPages Review to find out now.
Pogostick
Newbie
*
Offline Offline

Posts: 3


WWW
« Reply #6 on: February 13, 2003, 09:45:00 AM »

Well I checked and cgiemail has been there and the premissions are set as far as I can tell but the dam thing still doesn't work.
Logged
s102r18
Spacescooter Operator
*****
Offline Offline

Posts: 38


WWW
« Reply #7 on: February 14, 2003, 03:36:00 AM »

If you are sure the permissions are set to 755 for both cgi-bin and cgiemail, and that cgi-bin is under public_html, then it sounds like you will need to Email support.  We can't look in your directories to verify the settings are OK.  As you can see from the demo I put on my site, everything in the html form and the Email template is correct, and it works fine on my site.

Another option for you would be to use the FrontPage "feedback" form if you have FP Extensions installed on your site, and forget about cgiemail.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: