Search  
   
Browse by Category
 
Netfirms 24/7 Support .: SCRIPTS & APPLICATIONS .: Perl/CGI .: What are the common settings/paths for my CGI scripts?

What are the common settings/paths for my CGI scripts?

Most CGI scripts written in Perl will work on Netfirms servers. For your scripts to work properly, you may need to change some paths or settings within the script to the following:

Perl 5
Perl v5.5.3 scripts should include the following line at the beginning of all perl scripts:

#!/usr/bin/perl

Perl v5.8.3 scripts should include the following line at the beginning of all perl scripts:

#!/usr/local/nf/bin/perl5.8.3

Sendmail Location
/usr/lib/sendmail

CGI Url
http://membername.netfirms.com/cgi-bin/file.cgi

Full or Absolute root path:
To check the environment settings for your Netfirms hosting accout, please follow these steps:

1. Login to the Netfirms Members Control Panel at https://controlpanel.netfirms.com
2. Click Hosting
3. Click Environment

Non-forwarded Domains:
We recommend using the DOCUMENT ROOT environment variable to automatically insert the path in your Perl script:

$ENV{'HOMEDIR'}/www

You may have to use "double quotes" around the path.

For example the full path to your www directory would be:
"$ENV{'HOMEDIR'}/www"

Forwarded Domains (eg. yourdomain.com forwarded to /www/yourdomain.com/):
$ENV{'HOMEDIR'}/www/yourdomain.com

The full path to your cgi-bin directory would be:
"$ENV{'HOMEDIR'}/cgi-bin"

Alternatively, to find your home directory (HOMEDIR) and document root (DOCUMENT_ROOT) use the printenv program: Type membername.netfirms.com/cgi/printenv on any web browser.

It will display the absolute path and other variables needed for CGI scripts.

CGI File Permissions

Make sure all files and directories are set to chmod 755. The cgi-bin directory itself should be chmod 755.


How helpful was this article to you?


.: Powered by Lore 1.5.6
Visit Netfirms.com Web Hosting | Copyright © 1998 - 2009 Netfirms, Inc. All Rights Reserved.