Sunday, July 11, 2010

Problems on upgrade KT 3.6.1 CE to 3.7.0.2 CE

I have spent a long time for upgrading KnowledgeTree 3.6.1 Community Edition to 3.7.0.2 Community Edition. As you know KT 3.6.1 CE use its own installation stack, while 3.7.0.2 use OS distribution package like YUM and rpm for installation. I installed KT on CentOS 5.2, which now upgraded to 5.5 and use MySQL on port 3307.

For those that do not know how to upgrade, you have to follow this guide. But even if you carefully follow this guide you still have problems when upgrading. These are the problems you will have, and I provided the solutions here.

First Problem

When install KT 3.7.0.2 using stack installer, it works fine. But when starting to upgrade using php script (http://127.0.0.1/knowledgetree/) it completely failed. If you looking at error messages it complained about cannot include file DB/.php. Inspecting the file name, and open the source, it looks like that database type is undefined. This is caused by content of file in /usr/share/knowledgetree-ce/config/config-path which contains information about some configuration file. So to resolve the problem, delete all content in this file except one that specifies /etc/knowledgetree-ce/config.ini.

Second Problem

Ok at this point, you can run http://127.0.0.1/knowledgetree/ which start upgrading wizard. But you will end up with the upgrader cannot connect to the old MySQL server instance in my case MySQL at port 3307. This is also another bug in the package. After spending for some time in Google search I found that we have to replace a file in /usr/share/knowledgetree-ce/setup/migrate/steps/migrateDatabase.php with a patched file. So this resolve all problems encountered during upgrade. This is a link from knowledgeTree to download this file. If you have a problem please let me know.

I don't know why this problem is not resolved by a new released as I start first time upgrade for 2 months ago, upon failure I postponed an upgrade and then I started it again last week. Fortunately this time luck stays with me. Now the upgrade works fine.

1 comment: