Forum Moderators: open
Welcome to WebmasterWorld!
every time I click submit all it does is show the cgi script.
This means that your server has not been told to execute the script, rather than serve it as a page.
So, the first two questions are:
What kind of server is your site hosted on? (Apache, Microsoft IIS, other?)
What level of access do you have? (You will need to change some server configuration settings.)
Jim
Sorry I am not following what you are saying. I have logged into the site management folder and everything is enabled so my cgi scripts should function properly but nothing is happening. I did everything step by step. Made the appropriate changes to the cgi file in notebook and saved the file as a txt only cgi file in asci mode as recommended via the cgi instructions. I have made the thank you page but nadda. Just an error when you click submit. Any other ideas anyone?
You are being hosted on a unix server, so your files need to have the correct permissions set.
If you are using an FTP client to upload your files to the server, look through the list of files that are currently on the server.
You should see something like this:
-rw-r--r-- 1 fred users 3674 Aug 29 20:11 .htaccess
drwxr-xr-x 3 fred users 4096 Jun 20 17:19 cgi-bin
-rw-r--r-- 1 fred users 6275 Jun 20 17:19 emailus.gif
-rw-r--r-- 1 fred users 1406 Jun 20 17:18 favicon.ico
-rw-r--r-- 1 fred users 950 Jun 20 17:19 form_fail.html
-rw-r--r-- 1 fred users 12408 Aug 27 00:40 index.html
-rw-r--r-- 1 fred users 950 Jun 20 17:19 thankyou.html
The strings of rwx are unix file permissions. r=read, w=write, x=execute. There are three sets of rwxrwxrwx because in unix there are three different types of users - the first is the Owner of the file. Next is the Group (the group of users to which the Owner belongs), then there are all Other users who do not belong to the Group.
Files that typically reside in the cgi-bin directory are scripts, or something that needs to execute for all three types of user.
Your cgi-bin directory (and the file.cgi inside of it) should have a string in front of it that says rwxr-xr-x
If it doesn't, you need to find the menu selection in your FTP tool which says "chmod" - some FTP tools have this on a right-mouse-button drop down menu.
When you get there, put a check mark in the appropriate boxes giving:
Owner: Read, Write, Execute
Group: Read, , Execute
Other: Read, , Execute
Refresh the display of files and make sure that the string now reads rwxr-xr-x
If you see drwxr-xr-x with a "d" in front, that is a directory (also known as a folder).
Hope that helps.
But the Thanks should go to WebmasterWorld and all of the excellent brains that participate here.
I have many of these people to thank as well, since I have been reading this forum for a long time, learning step by step from some of the best.
I am very happy that I could contribute something.