Setting Up A CGI Script On Your Web Site

Before you set up any scripts you will need some information about your server. You can get this by e-mailing your web hosting provider. It's good to have these on hand before you try to set up a script. You may not need all of the information for each script, but some of the larger scripts demand more information to work. The information you may need is:

Path To Perl This is normally the first line at the top of a ".cgi" or ".pl" (Perl) script. A sample of a Path To Perl is /usr/bin/perl. Most scripts already have the proper Path To Perl included. If the script doesn't work it may be this variable.

Relative Path Which is the relative path to your server, not the HTML path. A sample is: /home/yourlogin/public_html/

HTML Path To Your Server Which is the URL path to your server, for example: http://yourdomain.com

Sendmail Path Which is the relative path to your mail server. A sample is: /usr/sbin/sendmail

SMTP Server Address Which is the path to sendmail on your server. A sample is: smtp.yourdomamin.com (This is rarely used)

Once you have those variables you can set up just about any script available.

Open the scripts that you are instructed to in the "readme" file or "installation" file. These instructions should tell you which scripts need to be set up with these variables. Open these files in a HTML editor, or a text editor. The instructions should also give you the exact location where each variable should be changed or inputed.

Once you have all of the variables set, upload your scripts. They must be uploaded in ASCII, not Binary, if your FTP program makes you choose. Once uploaded your scripts need to have the permissions set in order to work. The instructions should have those permissions for you. Normally a ".cgi" or ".pl" script has it's permissions set to 755.

Your FTP program should allow you to do that somewhere in the program. I use WS_FTP95 LE. To set permissions I simply right click in the right hand window when I am in the server directory where the script is. I click on "FTP Commands" then on "Site". I then type in the field "chmod 755 name of script". If the script is called "abc.cgi" then I will type in "chmod 755 abc.cgi".

It is now time to test the script. The instructions should tell you how to access the script, i.e. "yourdomain.com/abc.cgi". If you get a "Internal Server Error" then you need to go back and check the variables in the scripts and set the permissions, and try uploading the script again.

Read more articles by this author, about this and other subjects, here.

About The Author

Bob Power has been an Internet entrepreneur for longer than he would like to remember. He is currently on a voyage of learning, thanks to his readers, who have asked him to answer questions about topics they want more information on. You can see some of the surprising, and at times exciting results, and variety of topics and paths this has taken him on, or to contact Bob Power please click here.

These articles may be reproduced exactly as shown above. No revisions or changes are permitted.

In The News:


pen paper and inkwell


cat break through


You Need a Website!

No matter the size of your business, having a web... Read More

The Secret Benefit Of Accessibility: Part 1 - Increased Usability

Web accessibility has so many benefits that I really do... Read More

From Concept to Website

You've decided to create a website to market your products... Read More

Is Your Website Innovative? Increase Your Business Over Night!

While studying online for IT investment opportunities, I found that... Read More

Optimal Website Design

Optimal website design is the art of logical navigation.It will... Read More

Your Future Profit Is In The Stars

You don't believe in astrology but you check your horoscope... Read More

The Power Of CPanel

cPanel is a control panel for your website and allows... Read More

Newsletter Management Using PHP w/o mySQL for Beginners

Let's begin by setting some limits. If you're like me,... Read More

Selecting a Web Content Management Product

So you want to take a look at a real... Read More

Web Site Promotion: How To Advertise Your Website For Profits

Making money with your web site is the dream and... Read More

Why Is No-one Buying From My Website?

Are you, like many other website owners, frustrated at the... Read More

Track Your Visitors, Using PHP

There are many different traffic analysis tools, ranging from simple... Read More

Website For The Company Store

If your company own one or more stores, you might... Read More

10 Tips For A Successful Website

Have you ever thought the secret behind the success of... Read More

Building eCommerce Websites that Work - Part 2

Succeeding with an eCommerce website is a dream for many... Read More

UK Online Shopping with an Edge, for Buyers and Sellers Alike

Any new website competing on the internet, needs to take... Read More

A Beginners Guide to Server Side Includes

An Introduction to Server Side IncludesBeginner? That's OK!While much has... Read More

Beautiful Web Sites Seldom Make More Sales

Designing an E-commerce Web site is not as simple as... Read More

5 Tips To Supercharge Your Website Sales Copy

The art of turning website visitors into paying customers depends... Read More

Website Value - Whats Your Business Website Worth?

If you were asked to put a value on your... Read More

So You Want To Have A Website

So you want to have a website. You have gone... Read More

The Importance of Website Stats to You

One of the best tools you have as a webmaster... Read More

PIM Team Case Study: Creating Text Effects With PHP and GD

See how you can create graphic effects on text with... Read More

Seven Daft Things Not To Do To Your Website

1. Splash pagesMost of the time splash pages are uncalled... Read More

Improve Conversion Rates ? Effective Content

Your site is fast and getting traffic, but conversion rates... Read More

Tell me what your website does!

You know exactly what your organisation does and what your... Read More

How To Convert More Sales On Your Website

One of the biggest mistakes that most online retailers make... Read More

Improve Conversion Rates ? Load Times

Your site is getting traffic, but conversion rates are horrible.... Read More

What Hosting Companies Dont Tell You, Could Hurt You?

Did you know that hosting companies overcrowd their servers despite... Read More

Sticking To Your Plan

So you have a good idea for a business and... Read More

HTML Editors 101 - Smaller Is Better

SiteSpinnerSiteSpinner is a user-friendly web site development tool that includes... Read More

If Its Done Its Done for: Make Your Website Part of Your Business before You Build

Web sites are an Ongoing Part of Business.All too many... Read More

Growing Your Meetings In CyberSpace

As increasing numbers of people search for information on the... Read More