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.


MORE RESOURCES:
RELATED ARTICLES
Learn to Build a Better Online Business Website Using Keywords and Content
Are you aware that 90% of the websites on the Internet today are a waste of time and space. You have probably been on some of the sites I am referring to.
The Disability Discrimination Act (DDA) & Web Accessibility
There's been widespread speculation about the new legislation being introduced under the DDA (Disability Discrimination Act), which will ensure that websites are accessible to blind and disabled users. Try to find specific information about it on the Internet and chances are you'll come up empty handed.
Art, Artists and the Web: Part 3--What to Put on an Artist's Website
What to put your the website if you are an artist.1) The art workTry and think like a gallery hanging a show.
Ever Wondered What Challenges Other People With Their Web Site?
Have you ever wondered what challenges are faced by other webmasters and owners in the design and promotion of their websites, well I certainly have and so I decided to try and find out.I created a short survey which asked the following questions:1.
Email Addresses in Web Pages
You want to give your site's visitors a way to contact you by email but don't want your emali address to be abused. Here are a few ways to protect your email address when building your website.
Three Way Linking - Webmaster Strategy
Three way linking and concerns.For many years SEO experts were happy with two way linking or reciprocal linking but in due time researchers anticipated a change in Search Engine's Algo.
The Top Ten Benefits of Having a Web Site
Do you need a web site? Are you considering getting one but are unsure? Here we take a look at the main reasons why a web site could be beneficial to your organisation.1) It will give you the competitive edgeIf you do not have a web site people cannot visit it - an obvious point you might say.
Five Steps to Create Your Software Product with Outsourcing
Many executives and investors are skeptical that software products can be developed using outsourcing. Even more skepticism is expressed at the idea of outsourcing version 1.
KISS Your Website!
Many web developers today are starting to KISS their website, and it shows!No, I don't mean they get hot and heavy with the monitor, I mean they apply the basic values of Keep It Simple Stupd! (KISS)Many sites today are focusing on high end graphics, advanced java scripts, catchy logos, and other trivial factors. What they don't realize is that it's a win win game if you keep it simple.
Marketing Your Business Online
As a business you can't afford to ignore the Internet Age; in 2002 there was an estimated 605 million people online around the entire globe, today this is estimated at over a billion users worldwide.By using the Internet to market your business an entire world of potential customers are opened up for you, rather than just your local town, city, or country.
Why Should Your Business Go O.N.L.I.N.E.
Optimize your time. How much time each day must you devote to paperwork, scheduling and accounting? You strive to meet the needs of your clients, but when chained to the obligations of business management, it's just as important to make sure the doors stay open as it is to satisfy customers.
Building Websites with Directory Generator
Directory Generator, a product from Armand Morin and Marc Quarles, builds directory-style websites for you in a matter of minutes. It is simple to use, it's reliable, it does what it claims to do.
I Did It: Six Months to a Successful Website
For years now I've been looking to start my own business, but my highest priority has always been to spend less time working, and more time with my family, while still giving them everything they need (and most of what they want). It's a common dream, right? No boss to answer to, less stress, more vacation, more quality family time.
Your Future Profit Is In The Stars
You don't believe in astrology but you check your horoscope in the newspaper just for fun. Me too.
Guide to Internet Business - Design and Content
After deciding what kind of internet business you want to do, it's time to start planning the design and content of your business. Many people make the mistake of skipping this step, choosing instead to immediately start work on their website.
Benefits Of An Accessible Website: Part 1 - Increase In Reach
The DDA (Disability Discrimination Act) states that service providers must not discriminate against disabled people. A website is regarded as a service and therefore falls under this law, and as such must be made accessible to everyone.
Preventing Repeat Form Submission Using PHP Sessions
We've all seen those messages on some websites warning not to click a button more than once or negative consequences, like paying a bill twice, may result. Sometimes we can cause these problems by hitting the back or refresh buttons.
Five Reasons You Have to Stop Your Web Site
That's right. Your method, behavior and strategy you are now using to manage your website may be justifiable reasons to stop it as soon as possible.
MySQL Database Handling in PHP
Most interactive websites nowadays require data to be presented dynamically and interactively based on input from the user. For example, a customer may need to log into a retail website to check his purchasing history.
Guidelines for Web Page Optimization
Below, I have listed 8 simple steps that you can take to optimize your web pages. By following these, you will improve your chances of increasing your rankings:1) Target one word for each page: A huge mistake that many beginners make is cramming numerous keywords onto every page.