mod perl activation in Solaris 10 Apache2

From: Steven Sim (steven.sim@faplccc.net)
Date: Tue Mar 14 2006 - 09:52:40 EST


Hello Gurus;

My sincere apologies if this is a trivial issue. But I am unable to get
mod perl to run properly in Apache2 in Solaris 10 x86.

I have copied /etc/apache2/httpd-std.conf to /etc/apache2/httpd.conf and
subsequently modified the httpd.conf accordingly.

One of the changes I made is to add the following lines;

LoadModule perl_module libexec/mod_perl.so

Subsequently it Apache2 Services starts properly and a normal Perl cgi
script runs properly in /var/apache2/cgi-bin with the following output;

SCRIPT_NAME => /cgi-bin/env.pl
SERVER_NAME => localhost
SERVER_ADMIN => steven.sim@faplccc.net
HTTP_ACCEPT_ENCODING => gzip,deflate
HTTP_CONNECTION => keep-alive
REQUEST_METHOD => GET
HTTP_ACCEPT => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
SCRIPT_FILENAME => /var/apache2/cgi-bin/env.pl
SERVER_SOFTWARE => Apache/2.0.52 (Unix) DAV/2 mod_perl/2.0.0 Perl/v5.8.4
HTTP_ACCEPT_CHARSET => ISO-8859-1,utf-8;q=0.7,*;q=0.7
TZ => Singapore
QUERY_STRING =>
REMOTE_PORT => 32828
HTTP_USER_AGENT => Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.0.1) Gecko/20060206 Firefox/1.5.0.1
SERVER_PORT => 80
SERVER_SIGNATURE => <address>Apache/2.0.52 (Unix) DAV/2 mod_perl/2.0.0 Perl/v5.8.4 Server at localhost Port 80</address>

HTTP_ACCEPT_LANGUAGE => en-us,en;q=0.5
REMOTE_ADDR => 127.0.0.1
HTTP_KEEP_ALIVE => 300
SERVER_PROTOCOL => HTTP/1.1
PATH => /usr/sbin:/usr/bin
REQUEST_URI => /cgi-bin/env.pl
GATEWAY_INTERFACE => CGI/1.1
SERVER_ADDR => 127.0.0.1
DOCUMENT_ROOT => /var/apache2/htdocs
HTTP_HOST => localhost
UNIQUE_ID => fIBF-8CoAP0AAAGqQMIAAAAA

Looks like mode perl is loaded but.....

But scripts which run in /var/apache2/cgi-bin runs the normal cgi Perl
(at least that's what I've been taught) and not mod Perl, which is far
more efficient.

I tested the cgi-bin using perl scripts which used mod perl API and they
generated errors.

So I modified the httpd.conf futher and added the following lines;

Alias /perl/ /var/apache2/modperl/
PerlModule Apache::Registry

<Location /modperl/>
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options +ExecCGI
    PerlSendHeader On
    Allow from all
</Location>

I created the /var/apache2/modperl directory and placed the mod perl
scripts there. (with the proper permissions)

After restarting Apache, I get the following errors in
/var/apache2/logs/error_log

Tue Mar 14 21:05:26 2006] [error] Can't locate Apache/Registry.pm in
@INC (@INC contains: /usr/perl5/5.8.4/lib/i86pc-solaris
-64int /usr/perl5/5.8.4/lib
/usr/perl5/site_perl/5.8.4/i86pc-solaris-64int
/usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /u
sr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int
/usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl . /usr/apache2
/usr/apache
2/lib/perl) at (eval 2) line 3.\n
[Tue Mar 14 21:05:26 2006] [error] Can't load Perl module
Apache::Registry for server fujitsu:80, exiting.

Hey er....I would reeeeeeeeeeeeeeeally appreciate some help
here......this is driving me nuts.....

Warmest Regards
Steven Sim

Fujitsu Asia Pte. Ltd.
_____________________________________________________

This e-mail is confidential and may also be privileged. If you are not the intended recipient, please notify us immediately. You should not copy or use it for any purpose, nor disclose its contents to any other person.

Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:39:18 EDT