Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to configure Apache for running perl scripts.

by dsb (Chaplain)
on Aug 06, 2004 at 13:57 UTC ( #380543=note: print w/ replies, xml ) Need Help??


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


Comment on Re: How to configure Apache for running perl scripts.
Select or Download Code
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\

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://380543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-09-18 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (120 votes), past polls