1822158 Members
3485 Online
109640 Solutions
New Discussion юеВ

mod_perl

 
Jayesh shah
Frequent Advisor

mod_perl

Hi,

Where do I get mod_perl and how do i get it installed on hpux?

Thank you,
Jayesh
4 REPLIES 4
Wodisch
Honored Contributor

Re: mod_perl

Hi,

you should be able to download it from CPAN at http://www.perl.com and use it from within your Apache's "httpd.conf" file with as dynamically loaded module, so check your Apache has been "configure"d and "make"d with the proper options... (use "./configure -h" in the Apache-Source-dir for the correct spelling).

HTH,
Wodisch
Jayesh shah
Frequent Advisor

Re: mod_perl

Hi,

I believe Apache source code is not available with hpux (hpux is supplied only with the apache binaries).
I had downloaded mod_perl from
perl.apache.org but could not install it.

I tried perl Makefile.pl after extracting the module, but I was prompted for apached src directory and could not proceed.

Please, any ideas?

Thanks,
Jayesh
Wodisch
Honored Contributor

Re: mod_perl

Hi again,

well, getting the Apache sources from httpd.apache.com is quite easy, extract (with the GNU tar) and then cd into your source directory. Now "./configure -h" for the help, and call it with all the options you want, especially the one to permit "DSO" (Dynamic Shared Objects", i.e. without re-compilation. Then "make" (with the GNU make) and "make install", that's it, basically.

HTH,
Wodisch
someone_4
Honored Contributor

Re: mod_perl

Hi if you are trying to use mod perl with the HP apache you need to do what this document says. I had problems with it until I did the following

#########################
How to enable mod_perl in Apache server. DocId: KBAN00000583 Updated: 20010130

DOCUMENT
The Apache web server, version 1.3.12 distributed and supported by HP has
mod_perl statically linked into the server binary. This enables the Apache
server to interpret Perl scripts internally, without calling an external perl
interpreter. In order to utilize this functionality, first install the HP
supported HP Perl product "Perl 32 bit on HP-UX", product number B9829AA.

Ensure that the line AddModule mod_perl.c is uncommented, and add
the following lines to /opt/apache/conf/httpd.conf:

PerlModule Apache::Registry
Alias /perl/ /home/httpd/perl/

SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI


This will cause Apache to look in directory /home/httpd/perl whenever a URI
preceded with /perl is requested, and invoke the perl-script handler linked in
with the server binary. Of course any directory accessible by Apache may be
used to store perl scripts.

Use the following simple perl script, test_perl as a test:
use strict;
use CGI qw(:all);
print "Content-type: text/plain\n\n";
print `echo Apache mod_perl works!!!!`;


Open the uri http://HOSTNAME/perl/test_perl, and you should receive the output:
"Apache mod_perl works!!!!".