Implementing custom CGI scripts
within you own CGI-BIN Directory
Our web servers have the capability to run CGI
scripts in your very own "cgi-bin" directory, click
here for a test. Scripts may be written in languages called Perl. Perl is is
a world standard and is well suited to CGI. In addition, Perl code does not
require manual compilations whereas other languages must be compiled on another
computer prior to use.
Affordable Business Domain Hosting . can provide custom CGI scripting services. For more information click
here.
All documentation that we include in our
downloadable perl scripts, and our scripts' FAQ web pages, assume that you have
at least a general familiarity with setting up Perl scripts. If you need more
specific assistance, click here.
Here are some helpful tips to follow when
installing scripts;
Perl Scripts
- Save the Perl(CGI) script with the extension
of .pl or .cgi
- Upload to your cgi-bin directory to ensure
proper file permission settings
- Upload in ASCII transfer mode (and NOT
BINARY mode)
- The first line of each script must read: #!/usr/bin/perl
- Reference the script using /cgi-bin
- Always remember to include print
"Content-type: text/html\n\n"; or alternatively using the Perl
module CGI.pm (If you do not, your scripts will not run and you will get an
Internal Server Error message).
use CGI qw(:cgi-lib :standard);
print header();
Windows CGI Scripts
- Save And Compile the Windows CGI script with
the extension of .exe
- Upload to your cgi-bin directory to ensure
proper file permission settings
- Upload in ASCII transfer mode (and NOT
BINARY mode)
- Reference the script using /cgi-bin
- Always remember to include print
"Content-type: text/html\n\n";
For Perl - If a script calls another
file within your account, but the script does NOT require a URL, you need to use
the system path. Instead of using the absolute path to your home directory
("/yourdomain.com/cgi-bin/somefile"), you should instead use the DOCUMENT_ROOT
environment variable ($ENV{DOCUMENT_ROOT} in Perl) to determine the path of your
files or programs within a script. If this does not work please contact us for
more help via e-mail at: support@ABDH.net.
Change this: /yourdomain.com/cgi-bin/data/fact.pl
To this: $ENV{DOCUMENT_ROOT}/data/fact.pl
*** All hosting customers must compile their
own scripts on their local PC.
Other Resources
DOS
based Perl editor
|