Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: How to configure Apache for running perl scripts.

by Gilimanjaro (Hermit)
on Aug 06, 2004 at 15:09 UTC ( [id://380589]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to configure Apache for running perl scripts.
in thread How to configure Apache for running perl scripts.

The error message means:
  • Apache has found the script at the url you specified
  • Apache recognizes the extension, and is trying to use the cgi-script handler
  • But Apache's failsafe mechanism which required that ExecCGI is explicitly enabled is blocking you

Look for other 'Options' directives, maybe below your +ExecCGI one, that disable it again (maybe not explicitly, but possibly by specifying None).

Please take a good look at Apache's documentation on the Option directive and Directory, Location and Files blocks. Also make sure there are no .htaccess files around which override your Options directives. Without your complete apache config it's hard to exactly determine the exact cause. If you can't find it with these tips, put it on the web somewhere, and send me a message with the url. I'll have a look at it for ya...

  • Comment on Re^3: How to configure Apache for running perl scripts.

Replies are listed 'Best First'.
Re^4: How to configure Apache for running perl scripts.
by munu (Novice) on Aug 06, 2004 at 15:36 UTC
    I have commented out "AllowOverride None"
    But now I am getting follwing log message
    "malformed header from script. Bad header = hello: /var/www/cgi-bin/a.pl"

    a.pl contains
    #!/usr/bin/perl
    use strict;
    use CGI;
    my $q =CGI->new();
    print $q->header("text/html");
    print "hello";
      Okay!

      Now it's at least running your script, but something is not 100% with the output... Try:

      #!/usr/bin/perl use strict; use warnings; use CGI qw(:all); print header; print "hello!";
      And chmod 755 a.pl just to be sure.

      If it still gives the error, run the script from the command line (./a.pl) and paste the output...

      (We'll get there yet!)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found