Facebook

How do I implement custom cgi scripts?

Our servers have the capability to run CGI scripts based on Perl, Unix SH, KSH, CSH, and C/C++ languages. If you have a custom CGI script that you wish to use, simply upload it to your account’s “cgi-local” directory. Here are some helpful tips to follow when installing Perl scripts:

  1. Upload to your cgi-local directory to ensure proper file permission settings
  2. Upload in ASCII transfer mode (and NOT BINARY mode)
  3. The first line of each script must read: #!/usr/local/bin/perl
  4. Reference the script using /cgi-local (and NOT /cgi-bin)
  5. Our sendmail path is: /usr/lib/sendmail

If a script calls another file within your account, but the script does NOT require a URL, you need to use the system path.

For example:
/sites/<domain>/public_html/… <- if file resides in root

/sites/<domain>/cgi-local/… <- if file resides in cgi-local

Substitute the path to the file with your own domain name (without the brackets).
Your domain name is for example: yourdomain.com (be sure NOT to included www).

**NOTE**
OUR SERVER IS RUNNING A CGI WRAPPER PROGRAM. THAT MEANS PERMISSION SETTINGS FOR YOUR CGI-LOCAL FOLDER OR YOUR CUSTOM SCRIPT SHOULD NOT CONTAIN GROUP/OTHER “WRITE” ACCESS (EX: rwxrwxrwx); OTHERWISE, YOUR SCRIPT WILL NOT RUN PROPERLY UNDER OUR SERVER.