Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

For issues with installing and configuring the Archon software to begin running on your webserver.

Moderators: paulnsorensen, kylefox2, prom, rishel

Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Thu Oct 28, 2010 1:37 pm

Greetings!

Errata:
MySQL 5.0.26
PHP 5.1.2-29.63
SuSe ES 10

My apologies if this has been discussed/covered in an earlier topic or discussion, but I did not find the answer and the Admin manual seems out-of-date (1.11).

I am a contractor for a company that is currently running their production Archon 2.21 on a SuSe system and MySQL back-end. They want to make a jump all the way up to 3.13-r1, the project to which I am assigned.

I was able to get 3.13-r1 installed working on a test system (that also had 2.21 installed) by going to 2.23 and then to 3.13-r1 fairly easily. However, since they had no live data in the MySQL database (collection) on the test server, I have nothing to confirm that everything is working. As such, how do I migrate or export/import the collection from the production system to the test system to make sure everything is copacetic with the upgrade I performed?

The tables seem radically different for the archon database, or at least different enough to raise concern. I can easily dump from the MySQL on the production system and then source the dump on the test system if that's all it takes. However, since the tables are different (and the number of tables, as well), I hesitate to overwrite using the dumps; I'd rather not have to redo the upgrade again if it trashes any configurations needed contained in the archon database in MySQL.

Also, since I am not that familiar with Archon, many of the settings I did not know about (MARC, for example). I would obviously need to know how to edit these, but I assume that's somewhere in the Admin interface...

Hints?

As always, thanks for any advice, etc.

Kevin Freels
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby paulnsorensen » Thu Oct 28, 2010 1:44 pm

You can make a copy of SQL database from the production server, import it to your test server, then change the database in the config file to point to the one you've imported. Unfortunately, you'll have to do this twice -- once using the 2.23 files, and then once using the 3.13-r1 files.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Thu Oct 28, 2010 2:09 pm

Thanks for the reply, Paul!

So I assume you mean I can use mysqldump for export/import of the database?

I'm also assuming config.inc.php is the config file you're speaking about. At that point, I need to change the database name in the "$_ARCHON->db->DatabaseName" setting. Does this present any problems for any other settings (Login, grants, etc)?

Guess I need to re-do all my upgrade work. :? But at least I'll have good practise.

Thanks again!!!!!!

....k
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby paulnsorensen » Thu Oct 28, 2010 2:17 pm

westies wrote:So I assume you mean I can use mysqldump for export/import of the database?


Yes, I would use the command line utility and not something like phpmyadmin if the database is rather large.

westies wrote:I'm also assuming config.inc.php is the config file you're speaking about. At that point, I need to change the database name in the "$_ARCHON->db->DatabaseName" setting. Does this present any problems for any other settings (Login, grants, etc)?


If you have separate users/passwords for your databases, you'll also need to change those in the config.inc.php file as well.

westies wrote:Guess I need to re-do all my upgrade work. :? But at least I'll have good practise.


The database is what needs to be upgraded, the files (with the exception of config.inc.php and any possible custom templates or themes) don't store any custom information. So you'll need to do this again for the production version, assuming everything goes well with your testing version.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Fri Oct 29, 2010 12:06 pm

Paul,

Thanks for all the help and advice, but I'm still running into brick walls. On the other hand, that's what I get paid for.

However, that being said, I cannot seem to get valid upgrades performed reliably. I have attempted and been able to get to the 3.13-r1 level, but without a valid database. When I try to re-import the database during the upgrade from 2.21 to 2.23, the upgrade fails: Here are the steps I performed:

1) Removed (pushed aside) current Archon 2.21 directory

2) Put new Archon (2.23) dir in place (untar'd from distribution).

3) Copied over previous config.inc.php file into Archon directory.

4) Brought up web browser (FF), accessed Archon dir in browser (Step 1 of 4), pressed "NEXT".
-- DATABASE WARNING, ASKS IF I WANT TO BACK UP. I did, and it saved the DB as .sql.gz on local workstation.

5) Upgraded (Step 2 of 4) pressed "NEXT"

OUTPUT:
Initializing Upgrade...

Upgrading to version 2.22...

Setting DBVersion for Core Package
Done!

Upgrading to version 2.23...

Setting DBVersion for Core Package
Done!

Upgrade Complete!


6) Language install (Step 3 of 4) pressed "NEXT"

OUTPUT:
.
.
.
Importing package subjects...
Import of phrases successful.

All files imported!

7) Pressed "FINISH"

!!! RETURNS BLANK SCREEN, BOTH IN FF AND IE !!!

URL = http://mycompany.com/index.php?p=admin& ... 2Fpackages



!!! At this point, accessing the URL from the top restarts the install,
!!! so I renamed the Archon/packages/core/instal/install.php file to
!!! install.php.ALL_DONE
!!!
!!! HOWEVER, if I do that, then I only have the following displayed as
!!! the page, there is NO splash screen or login:

Page Generated in: 0.095 seconds (17% SQL in 71 queries).

Powered by Archon Version 2.23
Copyright ©2009 The University of Illinois at Urbana-Champaign



PAGE SOURCE:
<div id="archoninfo">
Page Generated in: 0.095 seconds (17% SQL in 71 queries).<br/>

<br/>
Powered by <a href='http://www.archon.org/'>Archon</a> Version 2.23<br/>
Copyright &copy;2009 <a href="http://www.uiuc.edu/">The University of Illinois at Urbana-Champaign</a> <br/>

</div>
</body>
</html>



So the upgrade fails? I can upgrade if I have no real database to worry about (at least I was able to do it about 5 times yesterday). I've gotten really good at resetting the 2.21 installation back to the original state (scripting is your friend).

At this point, I now have no database installed. When I was able to get this working, I tried re-importing the .sql.gz file using the import Utility for Archon SQL, but no changes seemed to occur (according to the Database Manager, I saw no difference in the records size/counts) when the "import" finished. I also tried to import the .sql.gz file by gunzip'ing it, adding a "USE 'archon'" statement in the file at the top, then sourcing it. This was successful in that MySQL had no problem with the source script, but I still have no menu (as above) and no way to check my install to see if I can move forward to 3.13-r1.

My apologies if I really missed something. Perhaps there is an "Archon For Dummies" link? :-)

Thanks again!!!!

....k
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Fri Oct 29, 2010 4:11 pm

Okay, I made some discoveries and progress, but I am still not done.

When the 2.23 upgrade asked if I wanted to back up the database, I said yes. Previously, when the upgrade was complete, and I tried to re-import the database, it failed from the Archon Utility both as a .sql and .sql.gz file. So I copied the .sql.gz file back to the server, gunzip'ed it, and then used "mysql 'source'" to import it back in. The upgrade to 3.13 would fail at that point, complaining that I was not at a level of 2.22 or above.

Poking around in the dumps, I noticed that the tblCore_Packages table entries for DBversions in the backups was at 2.21, so when I re-imported the first time, the second upgrade seemed to be keying off of that. The values do not change during the upgrade from 2.21 to 2.23 (makes sense since it wipes the database during the install). When I try to go from 2.23 to 3.13, I get a message saying that I need to be at 2.22 or above for that upgrade. It seems that the upgrade to 3.13 was keying off those tblCore_Packages values.

So, for ducks, I gunzip'd the .sql.gz file and edited the values for the tblCORE_Packages table, manually changing them to 2.23. Sure enough, the upgrade to 3.13 proceeded just fine. The database conversions proceeded, and I think it all works. HOWEVER...

The upgrade from 2.21 to 2.23 still left me with a minimal screen at the end (no menu or login screen, just what I described previously). I went ahead and tried the 3.13 upgrade just to see if my editing would work, but I wound up with the minimal screen again at the end... with one difference: the value of the Archon version now says 3.13-r1!

So if I can solve the menu screen issue, I think I'm good to go.

I'm going to dump the database from here, and then try my upgrade from 2.21 to 2.23 again to see if I can get it to a point where it's correct. Since my editing may have fixed my issue, I can try that again once I'm at that point.

Any idea on the minimal screen issue extremely welcome, and thanks as always!!
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Fri Oct 29, 2010 4:53 pm

The story thus far....

I tested my theory about upgrading without a database, and then importing it later with MySQL. The upgrade from 2.21 => 2.23 => 3.13-r1 went perfectly, and the menus are all there. When I restored the database from the dump after the "blank" upgrade to 3.13, the menus disappeared. So something in the database is hoarking the menus.

Erase the blackboard, start again....

....k
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby paulnsorensen » Mon Nov 01, 2010 8:48 pm

The problem is that you're re-importing the database.

Let's say you have one installation of Archon, running 2.21. There are two components-- the web directory, and the SQL database. Now, assuming you don't have any custom themes or templates, all of the important data lies within the database, with the exception of the config.inc.php file.

Now, let's say you have downloaded 2.23, and you have already deleted packages/core/install/install.php and copied the config.inc.php file into that folder. By replacing the current 2.21 web directory with the newly downloaded 2.23 files and running the upgrade in the browser, you will be converting your existing 2.21 SQL database into a structure compatible with version 2.23 of Archon -- all of your data stays put. After the upgrade is complete, that's it. There's no re-importing or anything.

Now, you have to repeat the same process to get to 3.13-r1 -- and once you've completed the upgrade, you leave the database alone, and it should work.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby mcyzyk » Tue Nov 02, 2010 12:49 pm

Whew! I just tried to upgrade from 3.01 to 3.13r1 using the instructions above and it didn't work. Luckily, I made a full backup of both Code and DB and was just now successful at rolling everything back...

I copied the config.inc.php file from the old codebase to the new.
I then renamed, in the new codebase, my /packages/core/install/install.php file to install.php.ORIGINAL.
I then swapped directory trees, overwriting the old codebase (3.01) with the new (3.13r1).
I opened up my trusty browser (IE), and went to my Archon homepage.
I was presented with an Upgrade message and a Next button, which I clicked.
It sat there for a loooooong while.
Thinking it had timed out, I went to my Archon homepage and was told, at bottom, that I was running 3.13r1. "SUCCESS!", I thought.
Au contraire
I went to Collections and was told that the Collections package was not activated.
So I logged in as Archon Admin and went to the Package Manager.
I attempted to activate/upgrade each of the packages there and every time I did I got this message: "Fatal error: MDB2 Error: unknown error in /var/www/html/archon/packages/core/lib/archoninstaller.inc.php on line 32"
(Note: By now I had switched over to Firefox, remembering that the Archon admin interface does not work with IE.)
At this point, I paniced and rolled everything back.

Are there detailed instructions somewhere on how to perform an upgrade?

Thanks,

Mark Cyzyk
Johns Hopkins University
mcyzyk
 
Posts: 60
Joined: Fri Jun 05, 2009 6:57 am

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Tue Nov 02, 2010 1:01 pm

[quote="paulnsorensen"]
Now, let's say you have downloaded 2.23, and you have already deleted packages/core/install/install.php and copied the config.inc.php file into that folder. By replacing the current 2.21 web directory with the newly downloaded 2.23 files and running the upgrade in the browser, you will be converting your existing 2.21 SQL database into a structure compatible with version 2.23 of Archon -- all of your data stays put. After the upgrade is complete, that's it. There's no re-importing or anything.
[/quote]

Unfortunately, that is exactly what I did.

When the 2.21 => 2.23 upgrade is complete, I only have a very sparse web page displayed without all the normal menus that are displayed in a very vanilla upgrade (no live data) from 2.21 => 2.23, as in:

Page Generated in: 0.09 seconds (14% SQL in 71 queries).

Powered by Archon Version 2.23
Copyright ©2009 The University of Illinois at Urbana-Champaign



The upgrade works, but only if I don't have the live data in the database. This sparse web page above is then carried on to the 2.23 => 3.13 upgrade, so if the menus from the first upgrade are hoarked, the menus in the upgrade hoarks the second.

Do you have an idea what might be causing this?

Thanks again!!!!!!!!

....k
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Wed Nov 03, 2010 1:20 pm

Sadly, I'm still having issues with this.... :-(

Somewhere, the top index.php (header?) stuff is not getting loaded after the upgrade is performed. Is there a way to set debugging on that to see what is being called? Is this a theme issue?

The apache logs show a call to index.php, but it's not really an error (there is output). As such, the apache error log shows nothing.

It seems there are a lot of other "includes" that are called from the top index.php. If I can track down where the missing file is, I think that will fix this problem.

And I still don't understand why the upgrade performs flawlessly with a empty database, yet has this issue with a populated one.

As always, thanks!!!

....k
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby paulnsorensen » Wed Nov 03, 2010 1:31 pm

In 2.21, if you go to the Configuration Manager (or Archon Configuration, I'm not sure what it's called in 2.21) and look for the settings for "Default Theme" and "Default Template Set", is there anything other than "default" entered for those values? If so, you'll have to change them both to default, and then manually migrate the custom themes from 2.21 to 3.13-r1, assuming they exist.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby westies » Thu Nov 04, 2010 11:16 am

Yea! That seems to have been the problem! I was able to go from 2.21 to 2.23 and the menus were visible. So now it's just a matter of importing the previous theme we had. I'll also make sure we're vanilla for the upgrade from 2.23 to 3.13.

Is this a bug? :-)

It seems to me that any configuration for user-defined templates should be preserved, or at least the user should be warned to reset the theme to the default before upgrading.

Are there any other caveats about the way the 3.13 php is displayed/used? Anything changed that would make implementations of user-defined themes in previous versions have issues?

Again, THANKS so much for the assistance!!!!!!!! You rock!!

....k
westies
 
Posts: 8
Joined: Thu Oct 28, 2010 1:05 pm

Re: Upgrade 2.21 => 2.23 => 3.13-r1 and Collection/MySQL

Postby paulnsorensen » Thu Nov 04, 2010 12:39 pm

westies wrote:Is this a bug? :-)

It seems to me that any configuration for user-defined templates should be preserved, or at least the user should be warned to reset the theme to the default before upgrading.

Are there any other caveats about the way the 3.13 php is displayed/used? Anything changed that would make implementations of user-defined themes in previous versions have issues?


No it's not a bug. Custom themes and template sets can contain anything, so there's really no way to preserve changes when we make upgrades to the public interface. I like the suggestion for the warning, though.

You're going to have to manually upgrade the custom themes and template sets. Here's a link to the changelog from 3.0 to 3.13-r1 which may give you some tips. Otherwise, I would suggest copying the default theme and reimplementing the changes made for the custom theme in there.
paulnsorensen
Site Admin
 
Posts: 631
Joined: Mon Mar 31, 2008 8:55 am


Return to Installation/Configuration Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron