PDA

View Full Version : CGI Script - advice needed


Wayne
05-10-2006, 05:59 PM
I have designed site that I need to have a form on, I have designed the form and cannot get it to work, I have never used scripts before so am a bit confused were to start.

I have looked all over net for handling forms for my site form and still cannot grasp how to get it right. can anyone help me with this.

Wayne

HeadAche
05-10-2006, 11:07 PM
Alright wayne'y boy... Dont know if you have stricktly posted this in the right section, but anyway. Theres a few things you have to check over here mate. Seems hard and arduas at first but after the first couple of times you will have it nailed.

1. I think you should first look for some documentation on your server providers help section. They should have some documentation regarding their own CGI system, all hosts seem to have different rules & regs.

2. The general rules for CGI scripts are thus. CGI scripts are normally stored in a folder called cgi-bin (www.domain.com/cgi-bin/). You need to CHMOD this folder to '755'. If you were using cuteFTP to do this you would right click on the folder to access and change the CHMOD setting. This means that the scripts in the folder can be executed (also refered to as setting permissions). The CGI file should also be CHMOD to '755'.

When uploading a cgi script file to your server through your ftp client, you may need to upload it in ASCII format. Again, using cuteFTP as an example you would just do this by selecting File > Transfer type > ASCII, then upload the file tp the cgi-bin folder.

3. I would say the most popular CGI script for feedback forms is formmail.cgi. Google it if you havent already got it if you find the one you have wont work.

4. On my server, my hosts make me add the email address I want to email the results of the form back to, to a email allowed list file, so that might be worth keeping in mind aswell.

Wayne
05-11-2006, 09:59 PM
Bit unsure what all this means, like CHMOD? 755? ASCII? Can you just let me know in a bit simpler terms for now.Sorry to be a hassle.

You need to CHMOD this folder to '755'. If you were using cuteFTP to do this you would right click on the folder to access and change the CHMOD setting. This means that the scripts in the folder can be executed (also refered to as setting permissions). The CGI file should also be CHMOD to '755'.

When uploading a cgi script file to your server through your ftp client, you may need to upload it in ASCII format. Again, using cuteFTP as an example you would just do this by selecting File > Transfer type > ASCII, then upload the file tp the cgi-bin folder.

domedia
05-12-2006, 06:12 AM
Wayne you got some quick catch up to do :)
Headache is using the simple and correct terms for this :-( If you want to run any script on a server (or website for that manner) you need to get familiar with these terms as they set the important restrictions to who can access, execute and write to a file.

chmod means changing permissions. You won't find this called anything else per say as this is the name of the actual command. '755' is a setting of permission (for who can read, write and execute the files), a quick unix tutorial will give you the basics of this.

HeadAche
05-12-2006, 11:04 AM
Honest to god mate, it really isnt hard and if I can say that, then believe me it cant be. You just have to get stuck in. Read over what I wrote slowwwwwwwly and very carefully, but most important of all get stuck in lad and give it a go...

Wayne
05-13-2006, 11:02 AM
I will read it all over nd over, I am gonna spend few days on this to get my head round it all, I finally managed to get my form working now though, thanks for all advice.