Last Updated: November 19th, 2018
Note: Read the instructions carefully, as failure to follow the steps may require the entire setup process to be restarted. If you are having trouble, see the FAQ section for ways to contact us and common setup errors.
-
Fork the repository.
-
Clone the fork to your local machine with git bash.
git clone https://github.com/YOURUSERNAME/lh-ehr.git
LibreHealth EHR will be cloned into a directory named lh-ehr
. Note this location for further use.
-
Downloaded the latest version (recommended) from the library hyperlinked above.
-
Includes the following required applications: Apache Web Server, PHP, MySQL.
-
Make sure it is downloaded to the
C:\xampp\
directory to give XAMPP write permissions.
Proceed after you have unpacked and met the requirements.
-
Move the
lh-ehr
project folder toC:\xampp\htdocs\
. -
Navigate to
C:\xampp\php\
. Open theConfiguration Settings
file calledphp
with a text editor or notepad. -
Change the following in the file using
Ctrl + F
to locate the variables. Some of the variables shown appear multiple times. Do not change any values aboveLine 170
(blank line).
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
-
Save the file and close it.
-
Launch XAMPP Control Panel. You can find it in
C:\xampp\
or with Windows Search. -
Click the
Start
button next toApache
andMySQL
. Make sure thatApache
is linked toPorts 80,443
and thatMySQL
is linked toPort 3306
. -
Use your browser to navigate to
localhost/phpmyadmin
. Click on theVariables tab
and setsql mode
to "" (blank). -
Restart Apache Web Server by clicking
Stop
and then clickingStart
again on the XAMPP Control Panel. -
Use your browser to navigate to
localhost/lh-ehr/setup.php
. Make sure there are no undefined index errors. If there are, check that you have changed thephp
settings file correctly and are using a supported PHP version of XAMPP. -
Leave
default
as theSITE ID:
and clickcontinue
. -
Make sure no more undefined index errors show up and that all statuses are labeled
ready
. Clickcontinue
. -
Select
Have setup create the database
and clickcontinue
. -
Enter a
MySQL Server Password
. Record this information. Setup anInitial User Password
, which you will need to access EHR. Record this information.
- If the above steps have been followed with clarity, click continue through the rest of setup and eventually the EHR login page will appear.
- Congratulations! You have successfully setup the LibreHealth EHR Developer Environment. It is recommended to bookmark the Login Page for easy access. Login with the username
admin
and password that you set up to access EHR.
phpGACL access controls are installed and configured automatically during LibreHealth EHR setup. It can be administered within LibreHealth EHR in the admin
-> acl
menu. This is a very powerful access control software.
Learn more about phpGACL here. It is recommended to read the phpGACL manual in the /lh-ehr/Documentation/README.phpgacl.md
file, the online documentation at LibreHealth, and the comments in the /lh-ehr/library/acl.inc
file.
In order to take full advantage of the patient documents capability you must make sure that the configuration settings in php
file include file_uploads = On
and that upload_max_filesize
is appropriate for your use and that upload_tmp_dir
is set to the correct value that will work on your system.
Be sure to back up your LibreHealthEHR installation and database before updating!
Login to EHR. There should be an orange button at the bottom right which you can hover over to reveal two options. Click the </>
button that appears. Follow the instructions to update EHR.
Q. I am getting a table doesn't exist
error!
This is because MySQL versions 5.7 and above have strict mode
on default which needs to be disabled. This can be resolved by making sure Step #7 is fufilled.
Q. I am getting an Internal Server Error
when trying to run portal dashboard!
Open the Apache configuration file and uncomment this line by removing the #
:
#LoadModule rewrite_module modules/mod_rewrite.so
Search for
AllowOverride None
and change it to
AllowOverride All
Q. I am getting a Check that mysqld is running
error when opening up EHR!
mysqld is a daemon that runs silently and can be invoked to start a mySQL server on your computer. If the credentials that lh-ehr uses to access the mySQL server are incorrect, then mysqld will not initiate the server, resulting in this error. This may have occured if you tried to sync your fork to the upstream repository. It will have reverted the database password in sqlconf.php
in C:\xampp\htdocs\lh-ehr\library\
.
Change the following line to include your own password inside the single quotes.
$pass = 'libreehr';
Restart Apache Web Server and MySQL.
Q. How do I get back to the Login Page once I close out?
You can go to localhost/lh-ehr
and it will redirect you to the login page.
Q. I need help! How do I contact someone?
Feel free to drop by the LibreHealth Online Chat or the LibreHealth Support Forum!