Forum Moderators: open

Message Too Old, No Replies

Contact Page Help?

         

RayofTennessee

2:30 pm on Sep 5, 2005 (gmt 0)

10+ Year Member



Hellow webmaster world newbie here and look forward to the boards. Can anyone help with what I believe should be a simple question regarding a perl script for a contact page? I found a free script on the net for adding a contact/emailing page to a website but every time I click submit all it does is show the cgi script. I have never used cgi before and am certain I followed the instructions correctly. Can I link to the pages where the contact page and the free cgi script is located? Thanks for all your help.

jdMorgan

3:05 pm on Sep 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ray,

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

encyclo

3:07 pm on Sep 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, Ray!

The first thing to check is whether your hosting company supports CGI scripts - some, especially free hosting companies, disable CGI scripts as either a security measure or as a way to make you pay more for the service. ;)

RayofTennessee

3:56 pm on Sep 5, 2005 (gmt 0)

10+ Year Member



Thanks all for the welcome in and I have this added to my favorites so I am sure I will be back quite ofton. Hopefully more to help then to ask. From what I have gathered the hosting server is Unix based with the following perl support modules: perl, v5.8.3 I have managed to finally bipass the cgi script showing on screen but not I just receive an error handling mesage. I do not know what level of access I have into the server due to this not being locally hosted but from everything I have read it should support this simple cgi script. Thanks in advance.

RayofTennessee

3:57 pm on Sep 5, 2005 (gmt 0)

10+ Year Member



What Operating System are we using?

FreeBSD

What Web Server Software is running on the server?

Apache 1.3

cws3di

4:16 pm on Sep 5, 2005 (gmt 0)

10+ Year Member



Make sure that both your cgi-bin directory and your file.cgi have 755 permissions.

When you chmod using your ftp tool, the file and directory permissions should end up looking like this:

rwxr-xr-x

If they do not have execute permissions, you will get a 500 internal server error

RayofTennessee

10:25 pm on Sep 5, 2005 (gmt 0)

10+ Year Member



Cws,

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?

cws3di

6:01 am on Sep 6, 2005 (gmt 0)

10+ Year Member



Hola, Ray.

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.

RayofTennessee

10:04 am on Sep 6, 2005 (gmt 0)

10+ Year Member



Thank you so much. I believe my problem was I have been using Dreamweaver to FTP and the read write execute wasn't displayed. I have downloaded an FTP client and just as you suggested there was no execute permissions allowed for the file. Your step by step help was a blessing indeed. Works PERFECTLY now! Thanks you, Thank you, Thank you.

cws3di

5:39 pm on Sep 6, 2005 (gmt 0)

10+ Year Member



I am so glad that I was able to help Ray.

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.