Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cgi dummy

Status
Not open for further replies.

modine

Technical User
Jul 27, 2008
8
US
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.
Thanks
 
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.
 
Well, upload this to that folder as test.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<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 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.
 
No, it says webpage cannot be found http 404
 
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.
 
Yes, but that says forbidden, so I'm not sure what to do next
 
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.
 
Try changing:
Code:
<td valign="top"><form name="surrogate" method="post" action=[red]"[URL unfurl="true"]http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"[/URL][/red]>
to:
Code:
<td valign="top"><form name="surrogate" method="post" action=[red]"[URL unfurl="true"]http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"[/URL][/red]>
[code]
and see if that helps. The browser may be confused by the double address and improper quoting there.
 
Let me try that again (not enough coffee yet)

Take:
Code:
<td valign="top"><form name="surrogate" method="post" [red]action="[URL unfurl="true"]http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"[/URL] [URL unfurl="true"]http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"[/URL][/red]>

and try:

Code:
<td valign="top"><form name="surrogate" method="post" [red]action="[URL unfurl="true"]http://www.preciousgiftsurrogacy.com/mainwebsite_cgi/formmail.cgi"[/URL][/red]>

hope that helps you.
 
Thank you but that doesn't do it either.
 
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.
 
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.
 
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/ < lrwxrwxrwx 1 root root 18 Jul 14 22:51 mainwebsite_html -> ../../var/ < -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/ is current directory.

> CWD /var/ < 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top