dondoucette
Technical User
OK I have been a little dismayed with being unable to get perl scripts to work on my server so today I decided to much about in my conf files to see what I could do cause I have other perl scripts I would like to run other than YaBB. So here is what I can tell you about my system....
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/
<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
What the heck am I missing here?
Thanks for your help!
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/
<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
What the heck am I missing here?
Thanks for your help!