Back to « KohaOnWindows
The following are important configuration files that affect the operation of Koha. You need to be aware of these files if you want to do any customization of settings from the standard windows install:
The datafiles used by Koha are determined by the combination of datadir= in my.ini and database= in koha.conf. If /mysql/data in my.ini and database=sample123 in koha.conf, then Koha will use the data files in the \mysql\data\sample123 folder. If you want Koha to use blank data instead, then edit C:\etc\koha.conf and change the database= line to database=blank123 and Koha will then use the data files in the \mysql\data\blank123 folder. Note that each database gets its name from the name of the subfolder in which its files are stored.
The Windows install package for Koha was written to make it possible to install more than one version of Koha on a single machine and then switch between them. This can be handy for someone who wants to evaluate both the current stable release of Koha as well as the latest test release. Or it could be useful for someone who wants to switch versions to assist the Koha development team with debugging and testing.
The Windows install package places all the files for each version of Koha that is installed in a separate directory path that includes the version number. For example, if you install Koha V1.2.3, all the Koha V1.2.3 files will be placed in \usr\koha123. If you then add an install of Koha V2.0.0 RC1 on the same machine, all of the V2.0.0 RC1 files will be placed in \usr\koha200RC1. Likewise, the sample data for V1.2.3 will be placed in \mysql\data\sample123 and the sample data for V2.0.0 RC1 will be placed in \mysql\data\sample200RC1.
Now of course, each time you install a version of Koha, it makes changes to all of the configuration files listed in the Important Configuration Files section above to point everything to the latest version that is installed. However, once multiple versions are installed, it is possible to switch between them by simply swapping a couple of the configuration files and then restarting the Apache webserver.
If you'd rather not worry about the details of what needs to be swapped, you can use a little utility included in the W32 Koha installs (any installs dated July 1, 2003 or later) that will make the changes for you. Go to Start → Program Files → Koha and run ```SetKohaVersion```, and you'll be asked which version of Koha to set as the default. You don't need to run this utility every time you start Koha. Once you set a default version, it will remain in effect until you run this utility again and change the version. The utility gets its list of versions from C:\etc\koahversions.txt, so if the list of choices is not correct, just edit this little text file and make the necessary corrections. All version on the list should be formatted like KOHA V123 or KOHA V200RC1. Do not use decimal points in the version numbers.
Remember, the version change will not take effect until you restart the Apache webserver. On Windows NT, 2000 and XP, the utility will restart Apache for you. On Windows 98, you need to restart it manually.
The two configuration files that need to be swapped to switch versions are httpd.conf and koha.conf. To make it easy to switch version, a version specific copy of each of these configuration files is installed. For example, if you have installed Koha V1.2.3 and Koha V2.0.0RC1 and you look in C:\etc you'll find a koha.conf.123 with settings for V1.2.3 and a koha.conf.200RC1 with settings for V2.0.0RC1. The actual file named koha.conf that is being used by Koha will depend on which install you did last or which version you choose when you run the above utility. To switch versions, the contents of koha.conf are repaced with the contents of either koha.conf.123 or koha.conf.200RC1 depending on which version you choose to run.
At the same time, koha.conf is switched, a similar switch needs to be made for httpd.conf. Continuing our example, if you look in C:\Program Files\Apache Group\Apache2\Conf you'll find httpd.koha.123 for V1.2.3 and httpd.koha.200RC1 for V2.0.0RC1. The actual file that is used by Apache is httpd.conf. To switch versions, the contents of httpd.conf are replaced with the contents of either httpd.koha.123 or httpd.koha.200RC1 depending on which version you choose to run. The Apache webserver needs to be restarted before the change will take effect.
The above utility automates the above process. But you should understand what's happening because if you need to customize the configuration of either koha.conf or httpd.conf, you should also add your customizations to the version specific copies or else all your changes will be lost the next time you switch versions.
Back to « KohaOnWindows