in reply to How to configure Apache for running perl scripts.

You have to configure Apache to handle Perl scripts. This might be a good place to start before you go showing off your source code :).

You also need to print out valid HTTP headers before you can print any web content. Something your tiny script does not do.

print "Content-type: text/html\n\n";
or even better:
use strict; use CGI; my $q = CGI->new(); print $q->header("text/html");


dsb
This @ISA my cool %SIG

Replies are listed 'Best First'.
Re^2: How to configure Apache for running perl scripts.
by munu (Novice) on Aug 06, 2004 at 14:24 UTC
    Now I have added the lines you have specified..
    But now it is telling that "you do not have permission to access a.pl on this server".
    BUT I DID "chmod 777 a.pl".
    In /httpd/logs/errlog file it is mentioned that "optionsExecCGI is off in this directory /var/www/html1/a.pl"
    suEXEC mechanism is enabled

      It is probably the permissions on the directory. You do not want the program to be rwx by the world, 755 should be sufficient - also with suExec it will protest at running things that appear to be owned by someone other than the user the script will be run at.

      /J\