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:
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.