Enchanted WebsitesEnchanted Websites
 
 
HomeWhy UsHot InfoPortfolioServicesHostingSpecialtiesAbout UsContact Us
 
  Technical Support
Marketizing Your Site IMarketizing Your Site II
Why Have a Site?
Useful Stats

 

Technical Support

CGI: Frequently Asked Questions




Q. I can't get my CGI script to work!

A. Here are some common reasons:

  • You didn't change the permissions of the script file to be executable. The error message usually indicates that you are forbidden to access the script.

  • You didn't refer to the script file at an address that could be found. Your "cgi-bin" directory is treated somewhat differently by the web server when it goes looking for files. Make sure you use an absolute web address for your cgi-bin directory, rather than a relative address, such as "../cgi-bin/script.cgi"; also make sure that you are using the correct reference to your cgi-bin directory:
  • http://www.your domain.com/yourdomaincgi/myscript.cgi

and not:

    http://www.your domain.com/cgi-bin/myscript.cgi

If the script still can't be found, contact us, providing us with the address of the script as just described and we'll check into it.

  • The server seems to find the script file, but an "Internal Server Error" appears. This means there is an error in the CGI code itself. Make sure that all the references to local resources are correct:

    • The first line should read:

      #!/usr/bin/perl

      and not something else, such as:

      #!/usr/bin/lib/perl

    • Similarly, any reference to the unix date command should read, "/bin/date"; and any reference to the unix sendmail command should read, "/bin/sendmail".

    • If for some reason you need to provide a local file system reference to files in your account, the full path is: "/usr/local/etc/httpd/htdocs/yourdomaincom". That is, if your domain name is "jasper.com", then the full path is "/usr/local/etc/httpd/htdocs/jaspercom".

    • You can make relative references to other web pages. Just remember that they are relative to the location of your CGI script. So if the script is in the cgi-bin directory, and the web page you want to refer to is in a subling directory, mydir, and is called "file2.htm", then you'll need to refer to it as, "../mydir/file2.htm".

     

If there is still an "Internal Server Error", use the tool on your control panel, "Check Perl scripts for common errors". This should help you pin down where the error is in your script.

PLEASE NOTE! DO NOT use the Perl checker on C/C++ compiled CGI scripts! The Perl checker has been known to corrupt compiled scripts and render them useless.

If you still can't figure it out, contact us and describe your problem. For a reasonable fee, our staff will be able to help you.

TECHNICAL SUPPORT HOME PAGE

 
 

Enchanted Websites
info@enchantedwebsites.com

9734 State Hwy 281 PMB 5034
Kelseyville, CA 95451-9636
phone: (707) 277-0173
fax: (707) 277-0179
Copyright ©1997- Enchanted Websites
All Rights Reserved

 
Why Us