Thursday, August 26, 2010

Upgrading KnowledgeTree - just kill me now

I hope the title doesn't give it away too much, but I'm not having the greatest of luck with upgrading our KnowledgeTree 3.5.2b (to evade this bug).

Even when I took the drastic step of reading the documentation, I haven't had much luck.

To get a 3.5.2b test server up and running, I did the following:
  1. Set up a VM and install Ubuntu server 8.04 on it
  2. download ktdms-oss-3.5.2b-linux-installer.bin from here and install it
  3. run ktree and make sure I can log in as default admin/admin
  4. stop ktree, and untar our existing backup over it (contain s a DB backup, documents, config.ini and plugins
  5. start just mysql (dmsctl.sh start mysql)
  6. cd /opt/ktdms/mysql/bin
  7. ./mysqladmin --socket=../tmp/mysql.sock -udmsadmin -p drop dms
  8. ./mysqladmin --socket=../tmp/mysql.sock -u dmsadmin -p create dms
  9. ./mysql -u dmsadmin -p dms < ../backup/backup.mysqldump
  10. chown nobody:root /opt/ktdms/Documents/
  11. /opt/ktdms/dmsctl.sh restart
So far, so good! I test and I can login using my LDAP credentials. Documents are there, I can get to the admin pages, it all looks okay.

Now, to upgrade to 3.5.3:
  1. Run ./ktdms-oss-3.5.3-linux-upgrade-installer.bin
  2. Once that's complete, browse to http://server-name/setup/upgrade.php - this wants us to log in as an administrative user before it will complete the DB upgrade - which makes sense... BUT none of the admin logins work. Every single one gets the "Could not authenticate administrative user" error message. LDAP user accounts, builtin admin account.. even when I did an echo -n 'password' | md5sum and poked that into the DB manually - nada! Soooo.....
  3. Edit /opt/ktdms/knowledgeTree/setup/upgrade.php and comment out lines 298 - 303:
if (!$authenticated)
{
session_unset();
loginFailed(_kt('Could not authenticate administrative user'));
return;
}

And hey presto, I can upgrade it! Then after the DB upgrade has finished, it goes to re-scan our plugins, POW! The wheels fall off once again:

Fatal error: Class 'KTFolderAction' not found in /opt/ktdms/knowledgeTree/plugins/WemagTreeBrowsePlugin/WemagTreeBrowsePlugin.php on line 34

Well colour me impressed. OK then...
rm -rf /opt/ktdms/knowledgeTree/plugins/WemagTreeBrowsePlugin/

And... now...

Fatal error: Call to undefined method PEAR_Error::getAuthenticator() in /opt/ktdms/knowledgeTree/lib/authentication/authenticationutil.inc.php on line 67

Arg. OK, maybe a restart:

/opt/ktdms/dmsctl.sh restart

Nope, after doing the setup/upgrade.php again, it started complaining about another Wemag plugin, so...

rm -rf /opt/ktdms/knowledgeTree/plugins/WemagSidebarManagement/

Do the dance again... and this time I can get to the login screen. The documents are there, so that's nice. Of course, the Wemag tree browse plugin is gone, which is okay, since I had to remove it.

But before we get too excited, when I log on as me, I initially get my usual "Philip Yarra" account... but once I try to manage anything I get the built-in Administrator account... and when I go to "DMS Administration" get I get "Permission denied" and "If you feel that this is incorrect, please report both the action and your username to a system administrator". I do feel that this is incorrect - hell yes, I'll call the sysadmin and... oh yeah, I am the System Administrator.

If I log in as the built in admin account, same deal - cannot administer ktree.

Overall, I'd call this a failure of an upgrade.

No comments:

Post a Comment