From modperl-return-63542-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Fri Feb 14 14:55:03 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 046A6108E4 for ; Fri, 14 Feb 2014 14:55:03 +0000 (UTC) Received: (qmail 51515 invoked by uid 500); 14 Feb 2014 14:55:01 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 51449 invoked by uid 500); 14 Feb 2014 14:55:00 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 51420 invoked by uid 99); 14 Feb 2014 14:54:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 14:54:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [150.101.178.33] (HELO mail.unitedinsong.com.au) (150.101.178.33) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 14:54:55 +0000 Received: from laptop3.herveybayaustralia.com.au (laptop3.herveybayaustralia.com.au [192.168.0.181]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id 3063E27336; Sat, 15 Feb 2014 00:54:33 +1000 (EST) Message-ID: <52FE2E28.5090207@herveybayaustralia.com.au> Date: Sat, 15 Feb 2014 00:54:32 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130530 Thunderbird/17.0.6 MIME-Version: 1.0 To: John Dunlap CC: mod_perl list Subject: Re: Initial setup problems with mod_perl2 - unable to locate modules References: <52FE1C14.9050703@herveybayaustralia.com.au> In-Reply-To: Content-Type: multipart/alternative; boundary="------------080705000609040504020402" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------080705000609040504020402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Unfortunately that didn't work in the startup.pl, as has been mentioned in both replies. Still got the same error with both startup.pl with use lib , as well as PerlSwitches -I. I should mention I've tried both modperl and perl-script options to SetHandler. There is one other error that shows up in the logs depending on changes made to the config: [error] Can't load Perl module It definitely seems to be an issue with @inc, but what? TIA guys On 02/14/14 23:52, John Dunlap wrote: > > Do you have a use lib 'PATH'; at the top of your startup.pl > ? This is typically how your module is added to the > perl include path > > On Feb 14, 2014 8:38 AM, "Da Rock" > wrote: > > I know this may seem straight forward and a RTFM response may be > in order, but I have been trying to crack this for some days now > (following attempts on and off, too, mind) and nothing I can > google seems to point to an accurate answer on what the problem is > here. > > I'm running FreeBSD 9.x with Apache22, and installed mod_perl2 to > try to switch away from php based development based on current > requirements. > > I have tried using a startup.pl , but I would > like to just use PerlSwitches -I instead (which from what I read > is possible); regardless the issue remains the same. > > I get a 500 response in the browser, and the logs have these errors: > > "failed to resolve handler `Mod_home::Mod': Can't locate > Mod_home/Mod.pm in @INC" > > and simply "failed to resolve handler" in the main server log. > > My config looks like this: > > :> > ServerName > ServerAlias > ServerAdmin > ErrorLog "/var/log/apache/-error.log" > CustomLog "/var/log/apache/-access.log" common > PerlOptions +Parent > PerlSwitches -I/usr/local/www//lib > PerlInitHandler Apache2::Reload > PerlModule Mod_home::Mod > > > SetHandler modperl > PerlResponseHandler Mod_home::Mod > Order allow,deny > Allow from all > > > > I also have PerlModule Apache2::Reload in the httpd.conf. > > Just to reiterate - I have tried this both as vhosting and as > single server setup, and I cannot seem to resolve the same issue > every single time. > > Can someone please give the magical incantation to make this thing > work? :-) or at least point me in the right direction? I'm really > starting to lose patience with this thing, and I now have a > deadline to sort this out which is fast approaching. > > Cheers > --------------080705000609040504020402 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Unfortunately that didn't work in the startup.pl, as has been mentioned in both replies. Still got the same error with both startup.pl with use lib <path>, as well as PerlSwitches -I.

I should mention I've tried both modperl and perl-script options to SetHandler.

There is one other error that shows up in the logs depending on changes made to the config:

[error] Can't load Perl module

It definitely seems to be an issue with @inc, but what?

TIA guys


On 02/14/14 23:52, John Dunlap wrote:

Do you have a use lib 'PATH'; at the top of your startup.pl? This is typically how your module is added to the perl include path

On Feb 14, 2014 8:38 AM, "Da Rock" <mod_perl@herveybayaustralia.com.au> wrote:
I know this may seem straight forward and a RTFM response may be in order, but I have been trying to crack this for some days now (following attempts on and off, too, mind) and nothing I can google seems to point to an accurate answer on what the problem is here.

I'm running FreeBSD 9.x with Apache22, and installed mod_perl2 to try to switch away from php based development based on current requirements.

I have tried using a startup.pl, but I would like to just use PerlSwitches -I instead (which from what I read is possible); regardless the issue remains the same.

I get a 500 response in the browser, and the logs have these errors:

"failed to resolve handler `Mod_home::Mod': Can't locate Mod_home/Mod.pm in @INC"

and simply "failed to resolve handler" in the main server log.

My config looks like this:

<VirtualHost <IP>:<PORT>>
    ServerName <server>
    ServerAlias <server>
    ServerAdmin <hostmaster>
    ErrorLog "/var/log/apache/<VHOST>-error.log"
    CustomLog "/var/log/apache/<VHOST>-access.log" common
    PerlOptions +Parent
    PerlSwitches -I/usr/local/www/<VHOST>/lib
    PerlInitHandler Apache2::Reload
    PerlModule Mod_home::Mod
    <Location /<VHOST>>
        SetHandler modperl
        PerlResponseHandler Mod_home::Mod
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

I also have PerlModule Apache2::Reload in the httpd.conf.

Just to reiterate - I have tried this both as vhosting and as single server setup, and I cannot seem to resolve the same issue every single time.

Can someone please give the magical incantation to make this thing work? :-) or at least point me in the right direction? I'm really starting to lose patience with this thing, and I now have a deadline to sort this out which is fast approaching.

Cheers

--------------080705000609040504020402--