On 11/16/2014 10:01 PM, kamaraju kusumanchi wrote:
> Thanks for pointing out that Apache requires additional configuration.
> I initially looked at
>
http://perl.apache.org/docs/2.0/user/intro/start_fast.html before
> posting to the list. But it was difficult to follow since the website
> tries to configure it differently than what seems to be Debian's way
> of configuring things.
> For example, it asks to add the following to httpd.conf
> LoadModule perl_module modules/mod_perl.so
> But there is no httpd.conf in Debian. Instead I found this in Debian
> root@hogwarts:/etc/apache2/mods-enabled# cat perl.load
> LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
> It talks about "Registry Scripts" without first telling what is
> actually meant by a registry script. So it was all confusing to me.
Yes, there are differences between stock Apache and Debian Apache. Take
a look at 'apropos apache', a2enmod(8), a2dismod(8), and the
/etc/apache2 tree.
> I finally got it working through some trial and error. Here is my
> configuration file
> root@hogwarts:/etc/apache2/mods-enabled# cat perl.conf
> <IfModule mod_perl.c>
> Alias /perl/ /home/rajulocal/public_html/perl/
> <Location /perl>
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
> Order allow,deny
> Allow from all
> </Location>
> </IfModule>
My "That is not a valid mod_perl program" statement was based upon the
traditional mod_perl handler registration/ callback approach discussed
in the Eagle book:
http://shop.oreilly.com/product/9781565925670.do
I'd forgotten that mod_perl has a backwards compatibility/ forward
migration feature which allows mod_perl to run Perl CGI scripts. That's
what you found. Beware that in the past, there was the risk of bugs due
to variable initialization assumptions common in CGI scripts. Read your
Apache documentation carefully if you're going to deploy this.
Congratulations on your determination and new-found knowledge! :-)
> Ultimately, what I want to do is a very simple thing. May be I am
> using the wrong tools here and making it more complicated than it
> actually should be. Please point me in the right direction if this is
> the case.
> I have a perl script that takes a bunch of input parameters and spits
> some output. I wanted to write a web interface for it where I get the
> input from the user via "HTML forms" and pass it to the perl script,
> then run it and show the output. Should I use javascript for this sort
> of thing? If so, where does it fit in? Any pointers to good
> documentation are appreciated.
Choosing a computer programming language is difficult. If you're up to
it, read "Structure and Interpretation of Computer Programs" and work as
many exercises as you can stand:
http://mitpress.mit.edu/sicp/full-text/book/book.html
SICP is not for the faint of heart -- the difficulty ranges from hard to
extreme. But your programming language world-view and coding skills
will be transformed.
Another consideration is how to deliver your program. Web browser based
applications, by design, have limited access to client-side data.
Basically, the user has to manually enter, save, upload, download, etc.,
everything. But, if they are standards-compliant, they can run in most
any modern browser. Native applications, including clients for client/
server applications, have far more capabilities (and risks). But, you
have to write one for each and every platform. Thus, the appeal of
Java/ JVM.
If you're going to let other people run programs on your computer, you
need to deal with security -- especially if the computer is on the
Internet. This adds system and network design and administration.
David
Archive:
https://lists.debian.org/546AD07A...@holgerdanske.com