KwaMoja for a fresh old look at ERP

KwaMoja is fresh as the project started with new developers in 2008 and old as it was based on WebERP, bring across all the good things in WebERP. I am looking at KwaMoja version 23.09.214.


Tim Schofield is the lead developer and started with a fork of the WebERP project at a time when WebERP developers may have had problems agreeing on future development. Tim said the following in an interview.

The term KwaMoja comes from Kiswahili, the dominant language in both Kenya and Tanzania. Literally "kwa moja" means "for one" and is intended to refer to the integrated nature of the software, and a sense of unity given the problems with webERP at the time.

Who would use KwaMoja?

Anyone who wants a low cost ERP, Enterprise Resource Planning, would look at free ERP software packages including WebERP and the WebERP love child KwaMoja. Anyone looking for ERP software that is easy extension, maintenance, and support would start with open source packages like KwaMoja. Anyone in Africa would look for the local support of KwaMoja.

KwaMoja is extending into hospital administration by integrating a package. This is one advantage of KwaMoja over WebERP for African hospitals.

Other differences between KwaMoja and WebERP might swing you toward one option or the other. There are also add on packages you might prefer.

What do you get?

You get a well developed ERP software package with no license or cost restrictions. Use it for free. Modify it at any time. Extend it any time. All the other requirements are free ouside of the computer hardware and the Internet connection if you use it over the internet.

KwaMoja uses the free open source PHP language. The database is your choice of free open databases so long as it is compatible with MySQL, with MariaDB being the most popular choice, and some others working with just slight changes to configuration or code. The Web server can be any free open source Web server with Apache the default setup. You can use others, like Nginx, with slight configuration changes.

You get health care and hospital related extensions focused on hospitals in Africa.

You get code compatible with very old versions of PHP, code needing slight changes for compatibility with PHP 8. I mention one change below in the Installation section.

The KwaMoja sites brags about the following.

  • Sales

  • Purchasing

  • Accounting Ledgers

  • Inventory Control

  • Manufacturing

  • Asset management

  • QA

  • Petty Cash

  • "and much more"

When would you use KwaMoja?

WebERP is the first free open ERP many people look at. KwaMoja would be the first choice if you are in Africa or work in a hospital.

Outside of hospitals, some other businesses and organisations have special needs only available in other ERP packages or in add-on modules. Your first look would be at free open source ERP packages used in your industry.


Africa is obvious. The developers are there. Any special requirements for your location can be handled easier when the developers are nearby or speed the same language.

There are countries outside of Africa where people travel back and forth to Africa, making a meeting with the developers easier.


Free is a big consideration for most of the planet. No corporation size budget. Freedom from licensing restrictions is next. Modify or extend to fit your requirements with no restrictions outside of the availability of a developer.

Open source means no spyware or viruses or any other nasty. You can look through the code and remove anything you do not like. You can study the code and add anything you like.

PHP means there are millions of developers available and it is really easy to teach almost anyone to write PHP code.

There are no hidden restrictions, no upgrades that suddenly cost a lot of money, and no lock in to anything. You can expert the data from the database for use anywhere else.

Hospital and health care oriented components are rare in other ERP options. The only ones I remember are expensive.


Anyone with any knowledge of Web sites can rent space on a Web server then install KwaMoja. A person with more detailed knowledge could rent a server and configure a Web server, Apache, Nginx, one of server other free open options. My test Web server is on my notebook running with Linux Mint. Mint provides several Web server options and I use Nginx.

Web servers are often configured with a database and you can choose your own if you are configuring a computer for Web service. I use MariaDB, the default in Mint, as MariaDB is 100% MySQL compatible and has improvements over MySQL.

PHP is available ready to install on every operating system I use. I select the latest stable version in the download list as every version brings big improvements. KwaMoja can be made compatible with PHP 8.1 with just a few changes. I think KwaMoja should push the minimum release up to PHP 7 as PHP 7 makes PHP more efficient for everyone. Less processing power required which means it is greener.


The value of ERP is obvious when a business grows in any direction. You start stocking products and reach a point where you cannot track stock in your jead or in a spreadsheet. The same happens as you add staff or add customers or start issuing complicated quotes and invoices.

At one stage, using a popular accounting package, I tried to convert quotes into invoices but it did not work. Quoting and invoicing were written as if they are totally unconnected. That activity would be one of my first tests for software in any business issuing lots of quotes. Take a quote and convert to an invoice. Then take a quote, select part of the quote, and convert the part to an invoice.

You will have your own needs. Make a list. Test the software. That level of automation is only useful if it is clear and accurate. You do not want workers doing something automatically if it is occasionally wrong as those mistakes will upset customers.

Set up a test Web server anywhere. I have one on my notebook. For an office, you could pick any computer and set up one for use on your internal network. Test. Test. Test some more.

For testing across branch offices, warehouses, and with customers, rent a simple Web server at a reliable host and test across the Web.

You then reach the point where everything looks good and invest in importing your existing data. You might test with one day of data then one month then one year.

Still happy with the product? Install in a secure live server for ongoing use. Make sure the backups work.

Not happy? Look at small changes to the current ERP package versus choosing another ERP package. They all have problems. You can pay $500 million for a professional ERP then find you have to make huge changes to your business and workflow to fit the expensive ERP because the cost of the slightest change might be $10 million or $100 million. Yes, I watched that happen. $80 million here. More there. Throw out the package, all that money, and years of work trying to make the business fit the software because the software cannot be easily changed. Start again.


The following error occurred when I tried to set up a tax related item. I was not following documentation or an example. The code missed a chance to produce a nice message.

Fatal error: Uncaught mysqli_sql_exception: Incorrect integer value: '' for column `kwamoja`.`taxprovinces`.`freighttaxcatid` at row 1 in /home/me/web/kwamoja/public_html/includes/ConnectDB_mariadb.php:77

Stack trace: #0 /home/me/web/kwamoja/public_html/includes/ConnectDB_mariadb.php(77): mysqli_query()

#1 /home/me/web/kwamoja/public_html/TaxProvinces.php(88): DB_query() #2

{main} thrown in /home/me/web/kwamoja/public_html/includes/ConnectDB_mariadb.php on line 77

To get around this type of error, you might set up two versions of KwaMoja, one empty for your configuration and the other loaded with the demonstration data so you can see examples of what is entered. You could also read the documentation although the documentation appears to be missing some fields and examples for some fields.

There is another problem found during installation with PHP 8. See below.


The installation goes through the site configuration then you log in as the Administrator and configure data options like taxes.

Installation page 1

KwaMoja Installation Wizard

  • During installation you may see different status messages.

  • When there is an error message you must correct the error to continue.

  • If you see a warning message you should take notice before you proceed.

  • If you are unsure of an option value, you should keep the default setting.

The installer will try and guess your language from your browser, but may get it wrong. Please select your preferred language below.


KwaMoja can use several different Database systems. Please select below the system you will be using.



KwaMoja is an open source application licenced under GPL V2 and absolutely free to download.
By installing KwaMoja you acknowledge you have read and agreed to the licence.
Please visit the official KwaMoja website for more information.



Installation page 2

Cookies are properly enabled in your browser

Your PHP version is suitable for KwaMoja

The base KwaMoja directory is writable

The companies/ directory is writable

The GD extension is correctly installed

The gettext extension is correctly installed

The mbstring extension is correctly installed

The libxml extension is correctly installed

The database extension is installed


Installation page 3

Please enter your Database information below. The database name is also used at log in time to choose the company for use.

  • Host name:

  • Database name:

  • Database Prefix – Optional:

  • Database User Name:

  • Password:

Installation page 4


Company Settings
Company Name:
Chart of Accounts:
Time Zone:
Company logo file:

Installation option
Install the demo data?

Administrator account settings
The default user name is admin which you can change below.
The default password is kwamoja which you can change below.
KwaMoja Admin Account: admin
Email address:
KwaMoja Password: test
Re-enter Password: test


Installation page 5

You are about to install the KwaMoja system.
This will take some time, please be patient.
To proceed click on the install button below.

Installation page 6

The companies directory has been successfully created
Your logo has been successfully uploaded
The config.php file has been created based on your settings.
The database has been created.
The version number has been inserted.
The database update revision has been inserted.
The admin user has been inserted.
Your chosen chart of accounts has been uploaded
The admin user has been given permissions on all GL accounts.

KwaMoja Installation Is Completed

The KwaMoja installation has been successfully completed.

Before using your system please ensure that write permissions have been removed from all files except the companies folder.

Click on the button below to start using KwaMoja.

When you first sign in you will be taken to a series of screens to help you set KwaMoja up.

Please enjoy using the software and hopefully contribute back to the project.

Installation page 7

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/me/web/kwamoja/public_html/includes/Login.php:32 Stack trace: #0
/home/me/web/kwamoja/public_html/includes/session.php(130): include() #1
/home/me/web/kwamoja/public_html/index.php(4): include('...') #2
{main} thrown in /home/me/web/kwamoja/public_html/includes/Login.php on line 32

I am using PHP 8.1. From

This function has been DEPRECATED as of PHP 7.4.0, and REMOVED as of PHP 8.0.0.

I fixed the code and the following page appeared.

User name:
Please login here

The old code:

if (get_magic_quotes_gpc()) {

The new code:

$phpversion = explode ('.', phpversion ());

if ($phpversion[0] < 8 and get_magic_quotes_gpc()) {

Installation page 8

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/me/web/kwamoja/public_html/includes/session.php:63 Stack trace: #0
/home/me/web/kwamoja/public_html/index.php(4): include() #1
{main} thrown in /home/me/web/kwamoja/public_html/includes/session.php on line 63

Clearly the get_magic_quotes_gpc test should be in a function called where needed. The function can return what is needed. I created the following function and used it to replace get_magic-quotes_gpc.



 * get_magic_quotes_gpc () is not available in PHP 8.


function k_magic_quotes_gpc()


    $phpversion = explode ('.', phpversion ());

    if ($phpversion[0] >= 8) { return false; }

    return get_magic_quotes_gpc();


I also applied the change in xmlrpc/debugger/common.php, the only other PHP code to use get_magic_quotes_gpc ().

Installation page 9

Initialise New Installation
You have reached this page because you have successfully installed KwaMoja, but there are still some pages that need to be setup.
Click on the link below and you will be taken to the next page you need to complete.
Once you have completed the page, click on the main menu icon and if there are more pages to be completed you will be brought back here.
Click here to continue