zane has asked for the wisdom of the Perl Monks concerning the following question:

I know this is only peripherally related to Perl, but you guys are so friendly and knowledgeable I figured I'd ask anyway...

I've got mod_perl-1.24_01 running under Apache 1.3.19, with Perl 5.6.0. I'm running the Everything Engine and I'm getting spurious Perl errors now and then, and no one else using Everything seems familiar with them. I'm led to believe it may be my underlying configuration. Perl modules, or mod_perl - something other than Everything itself.

My question is this: is there some way that I can verify that my mod_perl has been built with the correct perl libs - i.e. the ones that are on the system? Can it be done without re-compiling Apache and mod_perl? What's the best way to go about debugging something like this? Should I just start swapping our perlmodules with older versions and see if the errors go away (they're reproducable) in some configurations? Should I just buckle down and re-compile (or actually, compile for the first time - I'm using the outofthebox RPMed versions of mod_perl and Apache right now, on a RH7.1 machine).

Danke!

--
If we don't change direction soon, we'll end up where we're going.

  • Comment on How can I know my perl environment is consistent? (such that mod_perl is okay with it)

Replies are listed 'Best First'.
Re: How can I know my perl environment is consistent? (such that mod_perl is okay with it)
by tadman (Prior) on Jul 31, 2001 at 15:57 UTC
    As much as your question sounds like "I get errors using Perl, what am I doing wrong?", here goes:
    • Check your @INC, and your LIBS path. You can use libs or modify your environment, or move files around or soft-link them, but they have to be at the ready. If required, make a test script which tells you these, or spit them into an error log using CGI::Carp. You can also put stuff in your httpd.conf too.
    • Check your permissions, such that your Apache user (i.e. 'nobody') can read the modules
    • Make sure that mod_perl was built with the same version of Perl as you are currently using. No sense trying to fuss around with things when mod_perl is built with Perl 5.6.1 and you're installing into the 5.6.0 directory.
    • When in doubt, sync up everything by building from scratch. Make sure you do it in the order: Perl, mod_perl, Apache.
    • When all else fails, post some interesting error messages.
Re: How can I know my perl environment is consistent? (such that mod_perl is okay with it)
by grinder (Bishop) on Jul 31, 2001 at 18:52 UTC
    I would strongly recommend that you recompile the whole mess. Firstly, it's good experience. Secondly, you get to choose exactly what you want, and no more. mod_perl is a big enough pig as it is, without having modules that you'll never need compiled in as well.

    When you do so, make sure you select the mod_info module. It's not included by default, and it will provide you with copious amounts of information as to what exactly is compiled into your binary.

    update: you are also a couple of versions behind (which is SOP for canned distributions). Apache is sitting at 1.3.20 and mod_perl is 1.26. You really want to wean yourself off RPMs, .debs or whatever for critical applications such as web, dns and smtp. If a big security flaw comes up you want to be able to exercise the option of updating from a tarball directly, and not wait for some package maintainer to get around to bundling it up.

    --
    g r i n d e r