Operating System - HP-UX
1833059 Members
2535 Online
110049 Solutions
New Discussion

enabling perl on bin dist. of apache

 
SOLVED
Go to solution
Joe Steele
Occasional Advisor

enabling perl on bin dist. of apache

hi,
I'm having trouble enabling my apache server to run perl scripts.
I've installed an HP bin distribution of apache, available from:
http://www.software.hp.com/cgi-bin/swdepot_parser.cgi/cgi/displayProductInfo.pl?productNumber=HPUXWSSUITE
(os is HP-UX11.11)
I've uncommented (in /opt/hpws/apache/conf/httpd.conf) the lines referring to perl:
LoadModule cgi_module
LoadModule perl_module

PerlModule ModPerl::Registry
PerlModule Apache::Server


But starting my apache now sends back the following error message:
Can't locate warnings.pm in @INC

Is there anything I can do to add mod_perl to my precompiled apache, or should I just compile apache myself and forget about the bin dist. ?
10 REPLIES 10
Ralph Grothe
Honored Contributor

Re: enabling perl on bin dist. of apache

Though I haven't got an apache with mod_perl enabled to play with I'm quite sure that you'd better build all from the tarball sources.
This would include Perl itself (do read the README.hpux and special remarks concerning mod_perl usage), apache, and mod_perl.

As far as globals are concerned I think you have to be careful to reinitialize them.

But I have almost none mod_perl hacking experience to give any advice here.

I'm sure Merijn can help you.
Madness, thy name is system administration
Kevin Wright
Honored Contributor

Re: enabling perl on bin dist. of apache

Does apache start and work?

I would recommend building a new perl, mod_ssl, mod_perl, and apache from source, but probably not necessary. The HP depot should support mod_perl.
Joe Steele
Occasional Advisor

Re: enabling perl on bin dist. of apache

Yes, apache did start up with no problems.
I ended up just bulding apache from scratch myself and had no particular problems.

Guess it serves me right for trusting bin dist's and not building everything myself, the true open-source way..
Elena Leontieva
Esteemed Contributor
Solution

Re: enabling perl on bin dist. of apache

Rita  Thella
New Member

Re: enabling perl on bin dist. of apache

Could you please let me know the version of perl you are using?
trees are always green
Joe Steele
Occasional Advisor

Re: enabling perl on bin dist. of apache

Thanks Elena!

using HP's bin dist. of apache, I was able to use perl by following the directions in the link you gave. Although, some options were somewhat different, probably because I was using a different version of distribution (apache 2, etc.).

this is what I had in the modules section:

PerlModule ModPerl::Registry
PerlModule Apache::Server

SetHandler perl-script
PerlHandler ModPerl::Registry::handler
Options +ExecCGI
PerlOptions +ParseHeaders



and I had to leave this line commented, unlike what the directions were:
#LoadModule perl_module modules/mod_perl.so
Joe Steele
Occasional Advisor

Re: enabling perl on bin dist. of apache

i'm using perl version 5.8.0 by the way.
Rita  Thella
New Member

Re: enabling perl on bin dist. of apache

Ouch !. You need to have Perl 5.6.1 installed to use the HP's distribution of mod_perl.

This is because the mod_perl module has a hard dependency upon the Perl that it is built with. Please refer to the release notes for HP-UX Apache-based Web Server for more details
trees are always green
Rita  Thella
New Member

Re: enabling perl on bin dist. of apache

if you comment this line,

#LoadModule perl_module modules/mod_perl.so

you are no longer uisng mod_perl, all your .pl
files are run as cgi scripts.
trees are always green
Joe Steele
Occasional Advisor

Re: enabling perl on bin dist. of apache

ever still, perl scripts do run ..