
Our UNIX web servers have the capability to run CGI scripts in your very own "cgi-local" directory. Scripts may be written in Perl, Unix SH, KSH, CSH, and C (NOT C++) languages. Perl is our language of choice as it is a world standard and is well suited to CGI. In addition, Perl code does not require manual compilations whereas C code must be compiled on our web servers prior to use.
NT hosting customers have a "cgi-bin" directory for PERL scripts.
Here are some helpful tips to follow when installing scripts;
UNIX Shell Scripts
Perl Scripts
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 ("/www26/web/someid"), 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.
e.g.
From:
/www23/web/yourid/data/fact.htmlTo:
$ENV{DOCUMENT_ROOT}/data/fact.html
The UNIX system path to the sendmail program on your server
is
/usr/lib/sendmail
The UNIX system path to the date command is
/sbin/date
We can run only two C compilations for you. As such, we suggest Perl as an alternative scripting language. C++ is NOT supported.
If you would like to implement code that is written in C, you will first need to create and upload a makefile to your hostings account's cgi-local directory along with the source code. Once the makefile and code has been uploaded, you will need to contact Technical Support request that we compile the code. Note: You must create the makefile; we cannot compile the code without a makefile.
The code for a simple makefile is included below. If you need further information on creating makefiles, we suggest that you review the 'make' documentation or consult a tutorial on the 'make' program. We are unable to assist in the creation or editing of the makefile.
The following is a samle makefike:
CC=cc
AR=ar
test: test.cgi
test.cgi: test.h test.c ${CC} -o test.cgi test.c
Other Resources
DOS based
Perl editor
comp.lang.perl.misc
comp.infosystems.www.authoring.cgi
![]()
Further Questions? Please read the FAQ
throughly then send detailed info to: accts@latemodel.com
This page Copyright ©2000 Appleget
Associates