How do I use my own CGI scripts?

Overview: Netmar allows the use of custom CGI scripts with all user accounts, regardless of whether the account is a Basic or Sitemaster account, or whether or not the account has a Virtual Server (domain) setup.

Before Beginning
Determine what type of script you have. Perl and compiled C programs are the most common types. You cannot use DOS/Windows .exe programs.
Follow these steps
  1. Upload the script to your account (see Question 1.1. If your script is a Perl script, be sure to use ASCII (asc) mode to upload it.
  2. Login to your account via telnet (see Question 1.9)
  3. At the netmar> prompt, type:

    cd cgi-bin

    and press ENTER.

  4. At the next prompt, type:

    chmod 755 SCRIPTNAMEreplacing SCRIPTNAME with the actual name (remote filename) of the script you uploaded in Step 1.

  5. You may now reference your script using CGIWrap. The URL used to execute your script will be:

    /cgi-bin/cgiwrap/USERNAME/SCRIPTNAME

    Replace USERNAME in that with your Netmar username, and SCRIPTNAME with your script's filename.

    This means you can include hyperlinks to the script (if the script itself is meant to be used that way) using the above URL, or you can include that same URL in an HTML Form's ACTION tag.
    e.g. <FORM ACTION="/cgi-bin/cgiwrap/USERNAME/SCRIPTNAME">

If your script is a Perl script, and does not include a default PATH to the Perl interpreter, you should use, /opt/bin/perlas the location.
Arial,HelveticaArial,Helvetica