perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Da Rock <>
Subject Re: Initial setup problems with mod_perl2 - unable to locate modules
Date Sun, 16 Feb 2014 10:29:31 GMT
On 02/15/14 08:45, John Dunlap wrote:
> Well, if I were in your position, I would follow the tutorial to the 
> letter as a step in my troubleshooting. My reason for saying this 
> isn't that I doubt your coding prowess but rather that you need to 
> determine if the problem is with your code or with your installation 
> of mod_perl/apache. As the tutorial is known to work correctly, 
> whether or not it works is an important litmus test.
Hah! Ill own that I have no prowess, I'm still somewhat a beginner at 
coding and still learning the nuances of perl. My only reasoning is that 
rose by any other name should still work as well.

Actually, I feel a bit of a goose really. I did try using the tut's 
naming and got it working, but what stunned me was why it would make 
such a huge difference because I wrote it out pretty much word for word. 
So I went over it all again. The lib homes were exactly the same (-I 
that is), so the error was a wild goose chase. I went over the code 
again and the only diff was 'handler' typed in as 'Handler' - my coding 
typos again!

So my only beef here really is that the error message was enough to send 
anyone completely around the bend; it was not really indicative of the 
real error. When the logs says it can't find a file, then you go looking 
at that side of things, not really a code error. You'd expect it to 
indicate an error in the code for a code problem. So, why the bum steer?

But I have learnt quite a bit through this process of how to configure 
mod_perl. Just didn't have much fun trying to troubleshoot :)

Thanks for your help guys.
> On Fri, Feb 14, 2014 at 5:29 PM, Da Rock 
> < 
> <>> wrote:
>     On 02/15/14 07:46, John Dunlap wrote:
>>     Did you get it working with the code from the tutorial?
>>     If yes, and please forgive me if this seems a stupid question
>>     but... Did you forget to update the package statement at the top
>>     of the file to reflect your new module name?
>     Hah! No. I used my own name from the start, but all the code is
>     exactly as it is in the tutorial.
>     This wasn't the first time I've tried to crack this, and I figured
>     a different package/module name wouldn't make a difference.
>>     On Fri, Feb 14, 2014 at 4:42 PM, Da Rock
>>     <
>>     <>> wrote:
>>         On 02/15/14 01:15, David Booth wrote:
>>             I used this tutorial to get mod_perl working the first time:
>>             Can you get that exact example ( to work,
>>             following those instructions?  Please try that first,
>>             rather than your actual project, just to get the
>>             invocation debugged.
>>         See, now therein lies the problem. I'm starting with that tut
>>         and the same code but by using my module name so that I can
>>         test some other features when I actually get it working (such
>>         as reload).
>>         So basically I have the code for <>
>>         in the module, just with a different module/package name.
>>         Thats what stinks about the whole problem :-)
>>             David
>>             On 02/14/2014 09:54 AM, Da Rock wrote:
>>                 Unfortunately that didn't work in the
>>                 <>, as has been mentioned
>>                 in both replies. Still got the same error with both
>>        <> 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
>>            <>
>>                     <>? 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
>>                     <> <>, 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/ 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

View raw message