Using CGI Programs under UNIX.
Using CGI Programs under NT.

You can run CGI scripts with the understanding that you are running them on a machine that also serves domains for several other customers. The CGI scripts should be used sparingly and not incur a lot of CPU time. Should you have a need for running extensive CGI operations, we will be happy to locate your domain to a dedicated server or on a shared server with fewer domains under a different pricing structure. Your CGI scripts can be simple Perl or shell scripts or C or C++ programs compiled on our system. You may also install Java Applets.

We highly recommend you to use Form Mail CGI on our system to process your forms instead of using your own CGI program.

If you are using Perl for your CGI's make sure the top line of your scripts point to the location of perl on our network:

#!/share/bin/perl
-or-
#!/share/perl5/bin/perl

Make sure your scripts are in UNIX format. DOS format has ^M at the end of each line. Unix sees ^M literally, and will try to execute /share/bin/perl^M which does not exist.
You can use the dos2unix command to remove the ^M's:

dos2unix yourfile.cgi > tempfilename
mv tempfilename yourfile.cgi

The Java intrepreter and compiler can be found in /share/java.

It is recomended that you use /export/home/username/public_html/ when you refer to your web documents from your CGI. Do not use /wwwX/yourdomain.com/htdocs/ because this might change from time to time.

In order to run CGI scripts from your own HTML directory, please follow these instructions:

Common 500 Error Causes

Please note that if there is any problem executing your CGI script your server will display a standard error message:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to
complete your request.

Please contact the server administrator, support@sharedhosting.net and inform them
of the time the error occurred, and anything you might have
done that may have caused the error.
Webmasters, please check the following before writing to support@sharedhosting.net about the Internal Server Error that you just encountered:
  1. Make sure your script has .cgi extension.
  2. Make sure you followed the steps above to convert your scripts to UNIX text format.
  3. Try running your script in the shell by typing perl [your script name] in the script's folder. You can access the shell by telneting to Indus Hosting server at pop.sharedhosting.net.
    NOTE: the Unexpected End of File error is frequently caused by forgetting to close print<<"AAA"; statements
  4. If the script does not run because of the syntax errors, please correct the errors first.
  5. If the script runs fine in the shell, but returns an Internal Server Error while running from the web, go perfom the follwoing trouble-shooting steps:
    1. Change the mode of the file to 775 or 755 to make it executable.
    2. If that did not help, make sure that if the script uses external programs (i.e., sendmail or date), the correct paths to the programs are specified in the script. You can find out the path to the program by typing "which [program]" at the prompt.
  6. Frequently used programs and their locations:

Using CGI Programs under NT.

You can run CGI scripts with the understanding that you are running them on a machine that also serves domains for several other customers. The CGI scripts should be used sparingly and not incur a lot of CPU time. Should you have a need for running extensive CGI operations, we will be happy to locate your domain to a dedicated server Your scripts may be ASP, CGI (Perl), executables (.exe) or Cold Fusion.

There is a NT Form Mail processor available for NT domains. It uses Cold Fusion to send email.

You will need to use this as the top line of your scripts to point to the location of perl:

#!\Perl\bin\perl.exe

In order to run CGI scripts from your own HTML directory, please follow these instructions: