How to Setup Perl Scripts
Listed below are answers to some of the most frequently asked questions.
What is CGI?
How do I get CGI Access?
How do I go about using my CGI Scripts?
What language do my CGI Scripts need to be in?
Where can I get some CGI programs to use on my site?
What is the difference between CGI and JAVA?
What scripts are in the public cgi-bin directory?
What is the path to perl?
What is my basedir and baseurl?
What is the path to my cgi-bin?
My script is getting a Server 500 Error
How do I debug my scripts?
What is CGI?
CGI stands for Common Gateway Interface. CGI programs are run on the web server
to enhance the abilities of web pages, thus making them less static.
Example CGI programs are counters, email forms, and shopping cart
programs.
How do I get CGI Access?
Your cgi access has already been activated when your account was set up. You can
call your cgi scripts from anywhere but it is advised and most users put in /web/cgi-bin/
folder (which you have to create).
How do I go about using my CGI Scripts?
To start using your cgi access, put your scripts in your /cgi-bin directory located
in your web directory. You may also use subdirectories that branch off from your cgi-bin directory if you need.
To call your scripts from a browser or an html page, use the following syntax:
http://yourname.com/cgi-bin/
What language do my CGI Scripts need to be in?
Our servers currently support scripts written for Perl 5.0.1.
Where can I get some CGI programs to use on my site?
The CGI RESOURCE INDEX has over 1500 cgi resources.
They are located at
http://www.cgi-resources.com
What is the difference between CGI and JAVA?
CGI is a scripting language that is run locally on the server and
uses the servers resources to run your program.
Java is a programming language that runs on almost any platform.
Java is either embedded as a script in the web
page itself or it is a compiled program that is downloaded and run locally on the users computer.
What scripts are in the public cgi-bin directory?
We don't have one at this time. For over 500 free / shareware scripts, you may go to
http://www.cgi-resources.com
What is the path to perl?
#!/usr/bin/perl
What is my basedir and baseurl?
Your basedir is:
/home/sites/www.yourdomain.com/web/cgi-bin
Your baseurl is:
http://www.yourdomain.com/cgi-bin/
What is the path to my cgi-bin?
You can put your scripts in any directory under your web folder, many
create a directory called cgi-bin.
My script is getting a Server 500 Error
Double check all the following most common errors :
Is cgi enabled for the virtual site ? Check it in the admin panel.
Did you call it by typing the right URL ? Check both the URL and the
script name for upper/lower case letters.
Did you upload it to the right directory ?
If the script expects values : did you use the right method (POST/GET) ?
In the first line of the script, does the path point to perl?
If you edited path variables in the script, are they correct? Normally
there is no trailing slash.
Did you upload the script in ASCII mode?
Does the script have the right permissions?
Did you upload it as a site user or as a site admin?
How do I debug my scripts?
In 90% of all cases it`s one of the above errors
Return toResources pageReturn toHome
Designed and maintained by Cottonwoods Creations