Latest MLInvoice release: MLInvoice 1.20.5 (30 Apr 2019)
Please note that from version 1.14 the LOCK TABLES permission is required for the database user.
MLInvoice 1.11.1 is the last version to support PHP 5.3 and still available for download: MLInvoice 1.11.1 (14 Mar 2015)
MLInvoice 1.16.1 is the last version to support PHP 5.4 and still available for download: MLInvoice 1.16.1 (22 Dec 2017)
Latest development version (N.B.! May contain unfinished or not properly tested functionality, event though it is kept functional as far as possible):
MLInvoice git master.
See the commit history for information on the latest changes.
This version is not recommended for production use.
Note that the development version does not include all dependencies. You will need Composer to install them. Execute the command "composer install" in MLInvoice directory.
MLInvoice requires a web server with support for PHP (5.6 or higher) and a MySQL or MariaDB database. These can be installed on a server or locally, even on a laptop. Instructions for setting these up can be found elsewhere:
- Mac OS X: MAMP
- Windows, Mac OS X (also Linux if the packages coming with it don't suffice): XAMPP
- All environments that support Vagrant: MLInvoice-Vagrant. Vagrant provides a relatively easy way to create a virtual machine for running MLInvoice.
- All environments that support Docker: MLInvoice at Docker Hub.
Also web hotels that provide support for PHP and MySQL, are workable solutions, but it is important to note that if secure HTTPS protocol is not used, it is possible to intercept the data transmitted over the network. Many services provide phpMyAdmin for administering MySQL databases. It can be used to easily create the database.
MySQL support and mbstring module are required in PHP. Finvoice and other XML/XSL features require also DOM/XML and XSL modules. Required minimum PHP version is 5.6.
When the prerequisites above are fulfilled, the actual installation can be done following the instructions below.
- Create a MySQL database mlinvoice. Set collation to utf8_swedish_ci or another suitable utf8 collation.
- Create a MySQL user with sufficient permissions (at least SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, DROP, EXECUTE, CREATE VIEW, EVENT, TRIGGER, LOCK TABLES) to use the mlinvoice database.
- Extract MLInvoice installation package on the web server to a suitable directory (typically e.g. htdocs directory). Ensure that the file access permissions allow execution by the web server. Read permissions to all files for the web server are enough for normal use, but write access is required for automatic update.
- Create the database structure by executing in the mlinvoice database the commands in create_database.sql file (found in the installation package).
- Open MLInvoice in the browser and enter the required initial settings.
- Modify settings in Settings -> General Settings.
- Modify print templates in System -> Print Templates and enable/disable them as required.
- PHP default memory limit may not be enough for PDF creation. If it breaks with a an error, increate PHP's memory_limit setting to e.g. 32M (see http://php.net/manual/en/configuration.changes.php and http://php.net/manual/en/ini.core.php#ini.memory-limit).
- If you're going to use Finvoice or other XML formats, ensure that DOM/XML and XSL modules are installed in PHP.
- Settings in config.php may need to be modified if sending email does not work by default.
N.B.! MLInvoice does not support PHP's magic quotes. See instructions on how to disable magic quotes.
Remember to backup the database regularly. MLInvoice includes a backup function which creates an SQL script from the database contents (the script is similar to what phpMyAdmin's export function creates). The database can restores to an empty MySQL database by executing the script. Make sure at times that the backup works by creating a new database, running the script in it and checking the results in MLInvoice.
If, for some reason, MLInvoice does not work but complains about something or displays an empty screen, see web server and PHP logs. They may contain more information what the problem is.
Upgrading from Version 1.17 Onward to Any Later Version
Automatic updates are supported starting with version 1.17.0. Check the System menu. If automatic updates are not possible, the instructions below still apply.
Upgrading from Version 1.5 Onward to Any Later Version
- Replace files from old version with new ones (the package can be extracted on top of the old version).
The database is upgraded automatically, and a message about it is displayed on the login screen. If database upgrade fails e.g. due to insufficient permissions, the required steps are written to PHP's error log. Note that it may take a while to display the login screen on first run after installation depending on how many database updates need to be made.
- Make sure the MySQL user has the LOCK TABLES permission.
- If you encounter any weird behavior in the user interface after the upgrade, try clearing the browser's cache.