You are invited to Log in or Register a free Frihost Account!

CGI problems

I've made a form using cgi and a txt file so it can be sent to me by email. When I tried the form out I got "url not found on this server" for the txt file. I can't see anything that I've done wrong. I've done a test form to try and sort this out.

The form is in the cgi-bin and I've put a cgiemail folder in the cgi-bin for the txt file. Is this the right thing to do?
This is the code for sending the form

<form name="test" method="post" action="">

This is the txt file

From: [email]
Subject: Test

What is your name? [yourname]

I know cgi is not used so much these days, but I haven't got the time to learn php or perl right now.
If its 404 then either path is wrong or administrator blocked TXT files in this folder.

Please try to put this filde in same folder and check its permissions.
The permissions were wrong and I've now put them to 755. I tried putting the txt file in the cgi-bin folder but got a 404 file not foundmessage. I then put this file back into the cgiemail folder and got the 500 message:-

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

I don't understand what this means.

I need all the help I can get at the moment. I've got a spinal injury and I'm in the middle of a huge flare-up right now and I'm not able to sit at my computer long enough to try and work this out.
an Internal Server Error means you maybe have forgotten headers Wink

Did you put them ?

"Content-Type: text/html\r\n

I think no more is needed, but maybe I'm wrong.

Did you also compile executable file for server's OS ?
As Antonie suggested either check your header .. or your code .. try to run this code in local interpretator if you find any syntax error .. rectify it and upload again.

i'm experiencing similar problems with a perl script i got called perl digger :

pls help. came to fri cos i thought thi problem would be resolved
oh yeah

if u can help, ftp user
pass fri

u hav accesss to cgi-bin only, please help
i fixed it, usr deleted.

set cgi-bin folder and all contents to 755 Smile
thankyou fri hosting for excellent service by da way SmileSmileSmileSmileSmileSmile
try to run this code in local interpretator

What does this mean?

I've checked my headers and my code but I can't see anything wrong.

When I try testing my form using cgiecho I get a 404 document not found message. When I use cgiemail I get internal server error message.

My form comes up ok. It's when I press submit the problems start. In both cases the email template file comes up in the address box. this is the file that is causing the problems When I put the file in the cgi-bin folder I get document not found message. When it's in cgi-bin/cgiemail I get the internal server error message.

If I can't sort this out soon I'm going to have to get people to send the information by email. I'm getting to the point where I cannot spend any more time on this.
check ur permisions!!

I had an internal server error, changed perms and it worked. try it
Permissions are set at 755 for both files, so it's not that.
check da cgi-bin folder perms too just in case Smile
woundedhealer wrote:
try to run this code in local interpretator

What does this mean?

It means try to run you code on LOCAL MACHINE or different host. I bet there must be some mistake in either permission/yourfile/dir-settings good luck!
Related topics
Facing Many Problems
New forum area (computer problems)
deleting all the original files
about cgi setup
Problems With Index Page
Where is the Mail cgi located?
FTP problems --> Use Filezilla and/or active mode
a qustion about Movable Type
Help Needed Regarding CGI And Php
Any good php or cgi minipolls?
CGI internal server error [Resolved (somehow randomly)]
Python via CGI - A personal triumph
Python via CGI - A personal triumph
Reply to topic    Frihost Forum Index -> Scripting -> Others

© 2005-2011 Frihost, forums powered by phpBB.