×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

cgi dummy

cgi dummy

cgi dummy

(OP)
Hi,

I have no idea how to make my form return results to me. I have asked my web host to help but I'm not getting results from them. Would someone have a look at this form and tell me what I need to do or what I'm doing wrong. http://preciousgiftsurrogacy.com/surrogateform.htm

Thanks

RE: cgi dummy

(OP)
Thanks for the fast reply. Well that is the folder sitting on the server. I always thought it was incorrect but my host company hasn't put anything else on the server were it be or informed me differently.  

RE: cgi dummy

Well, upload this to that folder as test.html

CODE --> test.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type" />
  <title>Test Page</title>
</head>
<body>
So far, so good, so what?<br />
</body>
</html>
Then try to access http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/test.html.  That will at least confirm that the folder is accessible from the internet & that the file permissions are correct.  Your host company really should be able to provide some guidance.

RE: cgi dummy

(OP)
No, it says webpage cannot be found http 404

RE: cgi dummy

Then either something is wrong with that path or the server doesn't have permission to read the file.  The host would really be a help here because they should be able to tell you why you get the 404.

RE: cgi dummy

(OP)
Yes, but that says forbidden, so I'm not sure what to do next

RE: cgi dummy

(OP)
I have turned on the permission so it should work. I think there's a problem with the path, something my host should be able to fix.

RE: cgi dummy

Try changing:

CODE

<td valign="top"><form name="surrogate" method="post" action="http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi">
to:
[code]
<td valign="top"><form name="surrogate" method="post" action="http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi">
[code]
and see if that helps. The browser may be confused by the double address and improper quoting there.

RE: cgi dummy

oops ... excuse the typo in making the second block of code
 

RE: cgi dummy

Let me try that again (not enough coffee yet)

Take:

CODE

<td valign="top"><form name="surrogate" method="post" action="http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi" http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi">

and try:

CODE

<td valign="top"><form name="surrogate" method="post" action="http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi">

hope that helps you.

RE: cgi dummy

(OP)
Thank you but that doesn't do it either.

RE: cgi dummy

Have you checked the server error log to see if it gives you any further insight?

Also I have had problems with CGI's with the wrong end of line characters Ex. running a cgi saved in windows on a linux system. If there is a edit option try opening the file to edit and then saving it without making any changes to change the end of line characters.

If you can post your server side code that would also help so we can see if we can find any problems such as improper sha-bang line or something.
 

RE: cgi dummy

(OP)
Thanks for all your help. I'm not sure what you mean by server side code. Where do I find that? I have tried the above and it's the same for me.

RE: cgi dummy

(OP)
Is the below maybe what you mean?


 < 220 ProFTPD FTP Server ready.
 > USER preciousgift@preciousgiftsurrogacy.com
 < 331 Password required for preciousgift@preciousgiftsurrogacy.com.
 > PASS
 < 230 User preciousgift@preciousgiftsurrogacy.com logged in.
 > PWD
 < 257 "/home/preciousgift" is current directory.
 > PWD
 < 257 "/home/preciousgift" is current directory.

 > CWD /home/preciousgift
 < 250 CWD command successful
 > MKD MM_CASETEST4291
 < 257 "/home/preciousgift/MM_CASETEST4291" - Directory successfully created
 > CWD /home/preciousgift
 < 250 CWD command successful
 > RMD MM_CASETEST4291
 < 250 RMD command successful

 > CWD /home/preciousgift
 < 250 CWD command successful
 > MKD xyiznwsk
 < 257 "/home/preciousgift/xyiznwsk" - Directory successfully created

 > CWD /home/preciousgift
 < 250 CWD command successful
 > PASV
 < 227 Entering Passive Mode (67,19,70,146,236,216).
 > TYPE A
 < 200 Type set to A
 > LIST -al
 < 150 Opening ASCII mode data connection for file list
 < drwx------   4 preciousgift preciousgift     4096 Jul 29 17:45 .
 < drwxr-x--x   3 preciousgift preciousgift     4096 Jul 14 22:51 ..
 < -rw-r--r--   1 preciousgift preciousgift       24 Jul 14 22:51 .bash_logout
 < -rw-r--r--   1 preciousgift preciousgift      230 Jul 14 22:51 .bash_profile
 < -rw-r--r--   1 preciousgift preciousgift      124 Jul 14 22:51 .bashrc
 < drwx------   2 preciousgift preciousgift     4096 Jul 18 21:19 .spamassassin
 < lrwxrwxrwx   1 root     root           21 Jul 14 22:51 mainwebsite_cgi -> ../../var/www/cgi-bin
 < lrwxrwxrwx   1 root     root           18 Jul 14 22:51 mainwebsite_html -> ../../var/www/html
 < -rw-r--r--   1 root     root           25 Jul 15 18:11 skins.ini
 < drwxr-xr-x   2 preciousgift preciousgift     4096 Jul 29 17:45 xyiznwsk
 < 226 Transfer complete.
 > CWD /home/preciousgift/mainwebsite_cgi
 < 250 CWD command successful
 > CWD /home/preciousgift/mainwebsite_html
 < 250 CWD command successful
 > CWD /home/preciousgift
 < 250 CWD command successful
 > RMD xyiznwsk
 < 250 RMD command successful

 > CWD /home/preciousgift/mainwebsite_cgi
 < 250 CWD command successful
 > PWD
 < 257 "/var/www/cgi-bin" is current directory.

 > CWD /var/www/cgi-bin
 < 250 CWD command successful
 > PASV
 < 227 Entering Passive Mode (67,19,70,146,236,217).
 > TYPE A
 < 200 Type set to A
 > LIST -al
 < 150 Opening ASCII mode data connection for file list
 < drwxrwxrwx   2 preciousgift preciousgift     4096 Jul 27 18:06 .
 < drwxr-xr-x   9 root     root         4096 Jul 14 22:51 ..
 < -rwxr-xr-x   1 preciousgift preciousgift     3629 Jul 19 19:33 cgi-lib.pl
 < -rwxr-xr-x   1 preciousgift preciousgift    29217 Jul 19 19:16 formmail.cgi
 < -rwxr-xr-x   1 preciousgift preciousgift      340 Jul 27 18:06 test.html
 < 226 Transfer complete.
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close