Forum Moderators: phranque

Message Too Old, No Replies

Help: Perl not executing on my server....

         

doucetted

5:30 pm on May 6, 2005 (gmt 0)

10+ Year Member



I have Apache 2.0.47 on mandrake 9.2
mod_perl/1.99_09
Perl v5.8.1

whereis perl gives /usr/bin/perl

in commonhttpd.conf I have the following...

Alias /perl/ /var/www/perl/

<location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
</Location>

The perl directory is 775 and the perltest.pl script in the directory is 755

This is the script...

#!/usr/bin/perl

# Create an HTML page to display a message.
print "Content-type: text/html\n\n";
print "<HTML><BODY><TITLE>Test</TITLE>";
print "<CENTER>";
print "<H1>";
print "TEST";
print "</H1>";
print "<HR>";
print "Hooray! It works!";
print "<HR>";
print "</CENTER>";
print "</BODY></HTML>";

When I try to acces my test script from the web I get a prompt in my browser asking me if I want to download the file.

Link to the perl file
http://www.example.com/forum/perl/perltest.pl

What the heck am I missing here?

I want to run the YaBB forum like this...
http://www.example.com/community/YaBB.pl

Thanks for your help!

[edited by: jdMorgan at 6:28 pm (utc) on May 6, 2005]
[edit reason] Removed specifics per TOS. [/edit]

sitz

3:07 pm on May 7, 2005 (gmt 0)

10+ Year Member



Have you uncommented the following line from your httpd.conf:


#AddHandler cgi-script .cgi

? Note that you'll also need to add '.pl' to the end of that so that mod_cgi will be invoked for .pl files.

doucetted

4:27 pm on May 7, 2005 (gmt 0)

10+ Year Member



Exactly...

I received an answer to my query yesterday,
had the AddHandler directive but it didn't have .pl

Thanks
This problem is now resolved. :-))