DarkWizard
01-17-2001, 11:11 AM
Here are some common errors you may encounter installing a cgi script and the possible reasons:
500 Internal Server Error:
1. The file wasn't uploaded in ASCII.
2. File permissions are incorrect.
3. Syntax error in the script.
4. Path to Perl not correctly set.
401 File not found
1. Incorrect location
(scripts should be in the cgi-bin directory)
2. Check that the filename and path are correct in your
URL.
Server Side Includes:
1. "An error occurred while processing this directive!" The syntax here is very important when calling a script from a web page and the page should end in shtml unless your server parses cgi within html pages. You may also add a line to your .htaccess file to parse SSI in html pages (but I don't recommend it as it will add more processing to the server since it will now try to parse all html files).
Here is the proper syntax for adding SSI into a page:
1. <!--#include virtual="news.txt" --> this will include the info from news.txt to be displayed in your page.
2. <!--#exec cgi="/cgi-bin/news.cgi --> this will execute the news.cgi file and display it's output intoyour page.
The syntax as I have said is important and must be strictly adhered to, please note the space after the .cgi extension as this is critical and notice there is no space before the # sign!
[Edited by DarkWizard on 01-17-2001 at 10:24 AM]
500 Internal Server Error:
1. The file wasn't uploaded in ASCII.
2. File permissions are incorrect.
3. Syntax error in the script.
4. Path to Perl not correctly set.
401 File not found
1. Incorrect location
(scripts should be in the cgi-bin directory)
2. Check that the filename and path are correct in your
URL.
Server Side Includes:
1. "An error occurred while processing this directive!" The syntax here is very important when calling a script from a web page and the page should end in shtml unless your server parses cgi within html pages. You may also add a line to your .htaccess file to parse SSI in html pages (but I don't recommend it as it will add more processing to the server since it will now try to parse all html files).
Here is the proper syntax for adding SSI into a page:
1. <!--#include virtual="news.txt" --> this will include the info from news.txt to be displayed in your page.
2. <!--#exec cgi="/cgi-bin/news.cgi --> this will execute the news.cgi file and display it's output intoyour page.
The syntax as I have said is important and must be strictly adhered to, please note the space after the .cgi extension as this is critical and notice there is no space before the # sign!
[Edited by DarkWizard on 01-17-2001 at 10:24 AM]