MLInvoice 2.0.3 (31 Mar 2022)
MLInvoice 1.23.1 (31 Oct 2021) - Last version to support PHP 5.6
MLInvoice 2.0.2 (19 Feb 2022)
Latest development version which may contain unfinished or not properly tested functionality, even 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
php [path to ]composer.phar install in MLInvoice directory.
MLInvoice requires a web server with support for PHP (7.3.5 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 7.3.5.
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.
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 Automatically (Starting with Version 1.17)
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.
- Log out from MLInvoice.
- Replace files from old version with new ones but preserve existing config.php file.
The database is upgraded automatically before the login screen is displayed, 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.