Imbris, Inc - Taking the Internet by Storm!  

610 W Hubbard, Suite 125
Coeur d'Alene, ID 83814
Customer Support

CGI Script Directory
CGI Scripts

CGI Scripts

Commercial Domain customers have the ability to run cgi scripts in your very own "cgi" directory. Scripts may be written in Perl or C. (C code must be compiled prior to use.)


Installing scripts:

Perl Scripts

  1. Upload to your cgi directory and 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/bin/perl
  4. Reference the script using /cgi (and NOT /cgi-bin)
  5. Always remember to include print "Content-type: text/html\n\n"; or alternatively using the Perl module CGI.pm (If you do not, your scripts will not run and you will get an Internal Server Error message).
     
    use CGI qw(:cgi-lib :standard);
    print header();

 


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 hard path to your domain directory ("/domain/yourdomain/public_html"), 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.

Change this:  /domain/yourdomain/public_html/data/fact.html
To this:  $ENV{DOCUMENT_ROOT}/data/fact.html

 

  • The system path to the sendmail program on our UNIX server is /usr/sbin/sendmail
  • The system path to the date command on our UNIX server is /bin/date
  • The system path to the perl command on our UNIX server is /usr/bin/perl
Copyright © 2000 IMBRIS, Inc., All Rights Reserved
No part of this website may be duplicated or used in any way without prior consent.