Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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
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\

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 imbibing at the Monastery: (9)
As of 2015-07-08 00:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls