Lunarpages Web Hosting Forum

Author Topic: Need help with cgiemail  (Read 2616 times)

Offline Andrea

  • Pong! (the videogame) Master
  • *****
  • Posts: 22
    • http://www.westside-baptist.net
Need help with cgiemail
« on: January 06, 2004, 09:18:48 AM »
Hello

I'm totally new at this cgi script stuff for form mail. After reading the forum, I'm still very confused. I would appreciate any help.

This is the page: http://www.curtdavislaw.com/contact.html
It has a redirect to http://www.curtdavislaw.com/thanks.html
The cgiecho and cgiemail as well as my template request.txt are all in the cgi-bin.

I get a 404 "page cannot be found" error. I know I'm just missing something. But I need to really understand how to make it work. Once I get it working, I'll be using it for several sites.

Thanks! Andrea

Danielle

  • Guest
Need help with cgiemail
« Reply #1 on: January 06, 2004, 09:31:51 AM »
Hi Andrea,

The reason the request.txt page isn't being found is due to the path.  In the error message:

We can't find "http://www.curtdavislaw.com/public_html/cgi-bin/cgiecho/request.txt"

the path is noted as cgi-bin/cgiecho/request.txt but request.txt is not in a folder called cgiecho, it is directly inside the cgi-bin.  If you change the path in your contact.html document to the following:

http://www.curtdavislaw.com/public_html/cgi-bin/request.txt

it should hopefully work.

I hope this helps.

Offline Andrea

  • Pong! (the videogame) Master
  • *****
  • Posts: 22
    • http://www.westside-baptist.net
Need help with cgiemail
« Reply #2 on: January 06, 2004, 09:45:13 AM »
Thanks Miraenda. I fixed the path. Same 404 error. Is the action supposed to be set to the .txt file and not the actual script? Andrea

Danielle

  • Guest
Need help with cgiemail
« Reply #3 on: January 06, 2004, 10:11:24 AM »
Well, I am sorry I didn't realize this when I mentioned it before.  Yes, the txt file isn't a script file, so the action should be set to the actual script (likely cgiecho or whatever is supposed to perform the action).  You will want to change the path to the script itself.  Sorry I didn't notice that before.

Offline Andrea

  • Pong! (the videogame) Master
  • *****
  • Posts: 22
    • http://www.westside-baptist.net
Need help with cgiemail
« Reply #4 on: January 06, 2004, 10:29:17 AM »
Miraenda, Should the path be http://www.curtdavislaw.com/public_html/cgi-bin/cgiecho? If so, that doesn't work either and I have more than one problem in the way I'm doing things.

Andrea

Danielle

  • Guest
Need help with cgiemail
« Reply #5 on: January 06, 2004, 10:40:45 AM »
Hi Andrea,

I looked at the cgiemail guide and it does appear that the txt file should be the action, so I would change it back to request.txt using the path I provided.  The user's guide is located here:

http://web.mit.edu/wwwdev/cgiemail/user.html

I have never used cgiemail, so I am not certain what is going wrong.  It might be file permissions or something of that nature.  Try out the form again with the request.txt path, then look at CPanel to see what permissions you have on the file by going to File Manager, clicking on the folder icons in the left until you reach the cgi-bin, then you will see a set of numbers to the right of the file names.  These numbers (like 755) will represent file permissions for who can read, write, or execute the file.  Check to see if the file has 755 set for the permissions.

I will continue reading the user's guide to see if I can figure out what is happening.

Thanks

Offline Andrea

  • Pong! (the videogame) Master
  • *****
  • Posts: 22
    • http://www.westside-baptist.net
Need help with cgiemail
« Reply #6 on: January 06, 2004, 12:28:48 PM »
Miraenda, at least I'm getting something different. I figured out the path to be http://curtdavislaw.com/cgi-bin/cgiecho/~curtda2/cgi-bin/request.txt. No more 404 error.

But...

Now it's a 403 error. No variable substitutions in template.

Again, I don't know what I'm doing and learning as I go. I'm still studying the user guide and the different threads of the forum to figure this out. In the meantime...

I am using NetObjects Fusion to build my pages. It gives me a place to put the ACTION, METHOD, and HIDDEN FIELDS where I list the recipent and redirect to my thank you page. Do I have to use the template?

Thanks!! Andrea

Offline Andrea

  • Pong! (the videogame) Master
  • *****
  • Posts: 22
    • http://www.westside-baptist.net
Need help with cgiemail
« Reply #7 on: January 06, 2004, 12:31:26 PM »
Sorry, I forgot. My permissions are set to 755.

Here is the template (which is probably totally wrong!):

To: curt@curtdavislaw.com
Subject: Request for more information

Name?      [yourname]
Email?      [email]
Address?      [address]
City?      [city]
State & Zip?   [statezip]
Home phone?   [homephone]
Work phone?   [workphone]
Comments?   [comments]

Back to work!  :-? Andrea

Offline Andrea

  • Pong! (the videogame) Master
  • *****
  • Posts: 22
    • http://www.westside-baptist.net
Need help with cgiemail
« Reply #8 on: January 06, 2004, 12:52:00 PM »
Miraenda,  :yey:

I think I got it!! I'm not sure why I got the 403 error of "No variable substitutions in template" because I didn't change the template from what I posted above. My form worked with cgiecho and I tested it live with cgiemail. I received a success page and when I checked the email, the form was there!!

Using FormMail told me to use "redirect" as a hidden variable. But cgiemail uses the word "success". I changed that and I got my thank you page.

I appreciate your help, Andrea

Danielle

  • Guest
Need help with cgiemail
« Reply #9 on: January 06, 2004, 01:01:22 PM »
Hi Andrea,

I'm glad you were able to figure out the correct path and get the form working. I don't know if I really provided much assistance since you really did it on your own, but I am glad I was there to help you to get a better grip on what needed to be done.

Have a Blessed Day