|
From: Chris M. <Chr...@te...> - 2002-11-14 08:05:32
|
Hello, 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> ------------------ 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. Compilation failed in require at (eval 351) line 1. Syntax error on line 24 of /var/www/commerce/conf/httpd_modperl_solo.conf: 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. Compilation failed in require at (eval 351) line 1. ------------------ 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. 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... Thanks, Chris McDaniel -----Original Message----- From: Chris Winters [mailto:ch...@cw...] Sent: January 8, 2002 10:11 AM To: Chris McDaniel Cc: 'ope...@li...' Subject: Re: [Openinteract-help] upgrading questions... On Tue, 2002-01-08 at 09:38, Chris McDaniel wrote: > I'd like to upgrade my OpenInteract installation (1.21, SPOPS 1.41). I am > nervous as I'm working in a production environment and the company would be > less than pleased if the site went down for a day because I tried to upgrade > and broke it. So, my questions are, if I upgrade what will break? How can > I minimize breakage? Hmm hah, good question. To start off with, check out the 'Changes' files in both OI and SPOPS to get a sense of what's different. With SPOPS, I don't think there are any backward-incompatible changes, so you should be ok with this part. An easy way to test it is to install the newest version to a local lib directory, 'use lib' the dir, create an $R object using OI::Setup->setup_static_environment() and do some data fetching, relationship fetching, etc. With OI, there are quite a few changes. It might be useful to do the following: - Install the latest version to a local lib directory - Create a new base installation. - Create a new website from that base installation - Edit the config file (I recommend the INI version, but YMMV) with your existing values, including the existing database - In conf/httpd_modperl.conf, put a 'use lib' statement for your local lib directory - Install any custom packages you have created to the new site - Try and startup OI Off the top of my head, you may have problems with static pages since that's done through a new package (base_page) and database setup. You can continue to use the 'static_page' package if you like though, with just a couple of server configuration modifications. And the 'base_page' package comes with a migration script. Once you've plowed through any problems and the new server looks just like the old one, you can shutdown the old server, install OI and SPOPS to the Perl installation, remove the 'use lib' from conf/httpd_modperl.conf, modify your root Apache setup as necessary (e.g., change the 'Include' statement) and fire it back up. I think the key is to first setup a parallel server and modify it so the rollover time is minimal. I did this fairly recently, from an older version of OI (1.1) and it worked very well. It wasn't a flip-the-switch rollover because a number of items had changed, but it worked fine with minimal impact. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
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.
|
|
From: Chris W. <ch...@cw...> - 2002-11-14 16:59:17
|
On Thu, 2002-11-14 at 10:34, Chris McDaniel wrote: > 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 > ... Oh! I didn't realize you were running both sites in the same mod_perl instance. That won't work -- there are many, many more places where you'll run into the same sort of problems you had here. To do this you need to run two entirely separate mod_perl instances: one for the old site and one for the new. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
|
From: Chris W. <ch...@cw...> - 2002-11-14 13:49:58
|
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.
|