Processing
Lost Password? :  Create an Account :  Cart
Knowledge Base 
Search the Knowledge Base for

Here you can search and view our site Knowledge Base.
To find a specific article, use KB-article number format (ex. KB-1)

Article number: Article number: kb-15
Q. How do I use a cgi script? What are the paths to perl and CGI?

A.

CGI Scripts

All CGI scripts must be placed in your cgi-bin directory. The cgi-bin folder is located in your public_html directory (e.g. public_html/cgi-bin). If you want to run CGI script in a subdomain, put the script the subdomain's cgi-bin directory.

Uploading CGI Scripts

When using FTP, it is very important to upload script files (e.g. .cgi and .pl) in ASCII mode. FTP clients will give you the option of uploading in ASCII, binary, or "auto." If "auto" is selected, then make sure .cgi and .pl are considered ASCII files by your FTP client. Scripts will not execute properly if they are uploaded in binary mode.

Be sure to follow the directions included with the CGI script.

Program Paths

The following paths are commonly needed by scripts.

  • Path to perl: /usr/bin/perl
  • Path to sendmail: /usr/sbin/sendmail
  • CGI URL: http://www.yourdomain.com/cgi-bin/script.cgi
  • Subdomain CGI URL: http://subdomain.yourdomain.com/cgi-bin/script.cgi
  • Path to cgi-bin: /home/username/domains/domain.com/public_html/cgi-bin
  • Path to cgi-bin (subdomain): /home/username/domains/domain.com/public_html/subdomain/cgi-bin

This page has been viewed 351 times

Return to Search

 
Home |  Hosting |  Domains |  Support |  Log In |  Create Account |  Terms |  Save the Net  |  rss feed
Copyright © 2010 The Perfection Company, LLC. All rights reserved.