|
From: Chris M. <Chr...@te...> - 2002-11-14 15:38:17
|
Hello again,
Thanks for your suggestions. I changed the use lib as you suggested, and
the require for startup.pl is indeed after the <Perl> section. That alone
was not enough to fix it, but I did discover that if I changed the order of
the includes in httpd.conf something interesting happened. I have 2
websites configured, my productions site, which wants OI-1.21 and this new
site which wants OI 1.54. If I do this is my httpd.conf:
Include /var/www/1.21-site/conf/httpd_modperl_solo.conf
Include /var/www/1.54-site/conf/httpd_modperl_solo.conf
I get the error I gave you below. If I do:
Include /var/www/1.54-site/conf/httpd_modperl_solo.conf
Include /var/www/1.21-site/conf/httpd_modperl_solo.conf
Everything starts up OK but then my production site gives:
Cannot require stash class ()!
In my browser, which is bad for me.
So I'm wondering about maybe mod_perl compiling the OI modules and then not
searching @INC again next time the mod is called... Do I have to do
something crazy like rename either my old or new OI modules and fix all my
code to reflect?
Thanks,
Chris
-----Original Message-----
From: Chris Winters [mailto:ch...@cw...]
Sent: November 14, 2002 8:57 AM
To: Chris McDaniel
Cc: 'ope...@li...'
Subject: RE: [Openinteract-help] upgrading questions...
On Thu, 2002-11-14 at 03:01, Chris McDaniel wrote:
> Well, I've finally gotten trying to upgrade my OI installation. Following
> your outline below, I have installed (from cpan) the latest to a local lib
> directory (with PREFIX=/var/www/localperl/) and added the use lib
statement
> to my .conf file - here's a little excerpt:
> ------------------
> <Perl>
> use lib qw( /var/www/commerce );
> use lib qw( /var/www/localperl/lib/site_perl/5.6.1 );
> use lib qw( /var/www/localperl/lib/5.6.1 );
> </Perl>
What happens if you do this instead:
<Perl>
use lib qw( /var/www/commerce
/var/www/localperl/lib/site_perl/5.6.1
/var/www/localperl/lib/5.6.1 );
</Perl>
> And I had some troubles starting up the server - here's the output
> ------------------
> [Thu Nov 14 02:38:40 2002] [error] Cannot read configuration file! Error:
No
> configuration class corresponding to type (ini) at
> /usr/local/lib/perl5/site_perl/5.6.1/OpenInteract/Config.pm line 38.
> ...
> And it looks to me from the paths in the error message like my local
modules
> are not being used... So I tried adding a use lib statement to startup.pl
> as well, just to see, and I get the same error.
Yes, that's the problem. Is the <Perl> section you listed above before
the PerlRequire that brings in startup.pl?
> Using a standalone script with the use lib statements as you suggested
seems
> to be better - it just complains about a table not existing (which I
> expected) but I don't know if it is actually looking in my perllocal dir
or
> not.
>
> Can anyone help me? Apologies if the solution is obvious, I have my
> wee-hours-of-the-morning-brain on...
Ok, so this is definitely an issue with the library directories in
mod_perl. If moving the <Perl> section before PerlRequire doesn't work,
something else to try would be explicitly placing the entries in @INC:
<Perl>
unshift @INC, qw( /var/www/commerce
/var/www/localperl/lib/site_perl/5.6.1
/var/www/localperl/lib/5.6.1 );
</Perl>
This does the same thing as 'use lib' (mostly) but at a lower level.
Also, add something like the following to startup.pl to see if the
changes are taking properly:
warn "My INC:\n", join( "\n", @INC ), "\n";
Good luck!
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|