Implementing custom CGI scriptsOur 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++). Perl is our language of choice as it is a worldwide 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 their own Perl scripts. Here are some helpful tips to follow when installing scripts; Shell Scripts (UNIX only)
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.
Automated Tasks (cron.sh)A cron job can be set up to automatically run a script(s) within your cgi-local
directory (if available). We can schedule one cron job per account to run between the
hours of 2:00AM and 4:00AM ET on a daily basis. To request a cron job, you will first need
to create a shell script which includes the system path to the script(s) you wish to have
executed. The newly created shell script must be named "cron.sh" and be uploaded to your hosting account's cgi-local directory in ASCII transfer mode. When complete, send your request to Technical Support. If desired, you can specify a time between the hours of 2:00AM and 4:00AM ET that you would like the cron job to be scheduled. If no time is specified, the cron job will be scheduled to run sometime during that period of time. Once your cron job is scheduled, you can update your cron.sh as needed without
contacting Technical Support unless you wish to change the scheduled run time. *Ya Man Productions can run only two C compilations for UNIX hosting customers. As such, we suggest Perl as an alternative scripting language. C++ is NOT supported. |
Home | Custom PCs | Website Design | Website Hosting | Support | Contact Info | Feedback