|
I followed the tutorial and am able to get the following to work:
test-cgi which contians:
#!/bin/sh
# disable filename globbing
set -f
echo Content-type: text/plain
echo
echo CGI/1.0 test script report:
echo
echo argc is $#. argv is "$*".
echo
and a document I made from the entries called script.cgi which contains:
#!/bin/sh
echo "Content-type: text/html"
echo
echo "Something"
I can display them by just going to http://127.0.0.1/cgi-bin/script.cgi
Now the problem is I want to display something like:
#!/usr/bin/perl
#
# Program to do the obvious
#
print 'Hello world.'; # Print a message
and I get and error message:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.33 Server at 127.0.0.1 Port 80
Any advice? (Note, I already did "sudo chmod 755 FileName.cgi)
|
#!/usr/bin/perl
use CGI;
use CGI::Carp "fatalsToBrowser";