Re: iceweasel does not execute perl scripts
On 11/16/2014 06:20 PM, kamaraju kusumanchi wrote:
I am trying to set up the apache server with mod_perl so that I can
execute perl scripts in the browser itself.
There once was an attempt to put Perl code into web pages for execution
by browsers (among others), but JavaScript won that contest:
http://www.cpan.org/authors/id/M/MS/MSERGEANT/PSIntro.html
http://docs.activestate.com/activeperl/5.8/Components/Windows/PerlScript.html
mod_perl is a persistent Perl interpreter running inside Apache, and
avoids the forking and initialization costs incurred by Perl CGI scripts.
rajulocal@hogwarts:~/public_html/perl$ cat mod_perl_rules1.pl
print "Content-type: text/plain\n\n";
print "mod_perl rules!\n";
...
However, if I point the iceweasel brower to
http://localhost/~rajulocal/perl/mod_perl_rules1.pl , it launches the
file download dialog
That is not a valid mod_perl program, and Apache requires additional
configuration to know what URL's are to be passed to mod_perl. For all
things mod_perl, please see:
http://perl.apache.org/
Without seeing your Apache configuration, it may or may not be a valid
Perl CGI script. Have you set the execute bit on the file?
Note that PSGI/ Plack is a newer way to run Perl programs inside a web
server (Apache, nginx, and others):
http://plackperl.org/
HTH,
David
Reply to: