Ruba Awayes Installation

From LibreHealth EHR Wiki
Revision as of 16:42, 6 April 2020 by Konikodes (talk | contribs) (PHP warning messages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

LibreHealth EHR (2.0.0) Installation on Windows 10


This document explains how to install LibreHealth EHR version 2.0.0 on Windows 10.

LibreHealth EHR is a free and open-source electronic health records and medical practice management application.

This documentation explores the following areas:

  • Installing XAMPP
  • Unpacking Github LibreHealth EHR Repository
  • XAMPP Control Panel
  • Setting up LibreHealth EHR

This documentation assumes that the user is fairly familiar with Windows commands as well as the Windows User Interface, and has a GitHub account.

Ruba Awayes, LibreHealth EHR-Outreachy Internship Applicant, 30 Mar 2020


Installing XAMPP

In order to run LibreHealth EHR system on Windows, your computer should have the following prerequisites: MySQL, Apache (or any other webserver), and PHP.

For Windows users, it is recommended to install the XAMPP package which includes MySQL, Apache, and PHP.

I. Install the latest version of XAMPP from the official website (

Note: In this documentation we used XAMPP 7.4.3 for Windows 64 bit

II. Run the installer, and make sure that Apache Web Server, PHP, MySQL are checked as follows:


Note: By default, all the options are selected. You can check the components which you want to install and uncheck which you don’t want

III. Make sure that you install it on the C: directory, as follows:


IV. For the next steps, leave the default options and click Next to move further.

V. Once all the aforementioned steps are completed, wait the installation to complete, and click finish.

Unpacking Github LH-EHR Repository

I. Fork the LibreEHR repository ( into your GitHub repo.


II. Clone the forked repository to your local machine using your preferred console like GitBash or Cmder, using the following command: git clone

(photo below)


III. After this, LibreHealth will be cloned into a directory in your local machine called lh-ehr.

IV. Navigate to the lh-ehr folder in your local machine and copy it to C:\xampp\htdocs directory.

XAMPP Control Panel

I. Launch XAMPP Control Panel. (You can find it in C:\xampp\ or with Windows Search)

II. Following the instructions in the image below:

1. Click Config button in the Apache row

2. Click PHP (php.ini)


III. A notepad file will be opened, make the following changes in your php.ini file:

Note: You can use the search option Ctrl+ F to locate the variables

max_execution_time = 600

max_input_time = 600

max_input_vars = 3000

memory_limit = 512M

post_max_size = 32M

upload_max_filesize = 32M

session.gc_maxlifetime = 14400

short_open_tag = On

display_errors = Off

upload_tmp_dir is set to a correct default value that will work on your system

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE

IV. Save the changes and close the file.

Make sure you have disabled strict mode in MySQL, by applying the following steps:

From XAMPP Control Panel:

1. Click Config button in the MySQL row

2. Click my.ini


In the notepad file, find the following line:


There is another way to disable strict mode in MYSQL, see the numbered steps of the image below:

1. Open localhost/phpmyadmin/

2. Click on the Variables tab

3. Search for sql mode

4. Set it to: ""

5. Click Save


Note: in order to do the previous steps, you should start the Apache and MySQL services (illustrated in the next step), and after changing the sql mode, you must restart Apache service

Setting up LibreHealth EHR

I. Launch XAMPP Control Panel, click the Start button next to Apache and MySQL services. Make sure that Apache is linked to Ports 80, 443 and that MySQL is linked to Port 3306, as follows:


II. Navigate to LibreHealth setup in your browser: http://localhost/lh-ehr/setup.php

III. The first screen gives some general instructions, leave default as the "Site ID:" and click Continue.


IV. Make sure that all is ready with no errors, and click Continue


V. Step 1 asks if you want LibreHealth EHR to create the database. At this step choose the option "Have setup create the database" and click Continue.


VI. Step 2 is where you input MySQL server information along with LibreHealth EHR user.

In this step, only enter a Password for MySQL server and an Initial User Password, write them down for future use and click Continue.

Note: Be patient, don’t close the window, this step may take a long time


VII. Configuring LibreHealth EHR system, if all is OK, click Continue


VIII. Installing and configuring Access Controls (php-GACL), then click Continue


IX. Step 5 gives detailed instructions to configure PHP, check that all the values are changed as we did earlier to the php.ini file. It is recommended to print them for further reference.


X. Configuring Apache web server, if all is good, click Continue


XI. The final screen means that LiberHelath EHR is now installed, just click the link as the picture below to start using the LibreHealth EHR system


XII. Congratulations, you can now start using LibreHealth EHR system, enter the initial username and initial user password that you have entered in point 6



How do I get back to the Login Page once I close it?

Just open your browser, go to localhost/lh-ehr and it will redirect you to the login page.

I’m getting Unable to connect error?


Make sure that Apache and MYSQL services are started in XAMPP control panel.

I am getting a table doesn't exist error!

This is because MySQL versions 5.7 and above have strict mode by default, you need to disable it.

This can be done by editing the MySQL configuration file (my.ini) and modifying sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION and change it to “”.

PHP warning messages

If you are receiving many PHP warning messages while using the system (photo below)


You have to turn off PHP error reporting, by editing the Apache PHP (php.ini) file, and modifying the display_errors value to Off.


This concludes how to install the LibreHealth EHR system on a Windows 10 environment.

We explained every step starting from installing XAMPP and setting up the LibreHealth EHR system on your local machine.

In case you want to install LibreHealth EHR on another operating system, or using Virtual machine on Windows, please ask our community support in the LibreHealth Forums (