Personal tools

XAMPP and OpenEMR Installation in OS X

From OpenEMR Project Wiki

Jump to: navigation, search

Contents

Introduction

OpenEMR cannot run without a Web server, database and PHP. The user will find that installing and configuring each component to be more complex than installing the stack. It is far simpler to delete, then reinstall applications; if they are all in one folder.

For the new user, it may require multiple attempts before success can be achieved. This is accomplished by deleting the entire XAMPP directory with AppCleaner, then repeating the installation steps.

Upgrading is also facilitated by the central location of the stack and OpenEMR.

Two readily available bundles are XAMPP and MAMP. XAMPP was chosen over the MAMP because fewer steps are required; port settings are pre-configured and there is a new backup/restore feature, see FAQ, How do I backup/restore my XAMPP system?.

XAMPP

  • If another Apache server or MySQL is already running, stop both according to instructions in the video below. With Yosemite, version 10.10, the built-in Apache server and PHP have been turned off as defaults.

Don't download the latest version, there are incompatibilities with this version of PHP and OpenEMR. Version 5.6.30/ PHP 5.6.30 is recommended

  • Click on the DMG file. Drag and drop the file into the Application folder to install.
D&d1.png


  • Do not start Apache nor MySQL until completion of OpenEMR installation and changing the php.ini settings as explained in the sections below.
  • Do not create a new database because the OpenEMR setup will do it for you.



How to install XAMPP on a Mac


OpenEMR

Download

1. Download OpenEMR from SourceForge:

OpenEMR 5.0.0
or the most current version from this webpage under the Windows heading.

2. Extract the downloaded OpenEMR zip file, then move this directory to the htdocs folder.

Note that the path is /Applications/XAMPP/xampfiles/htdocs, not /Applications/XAMPP/htdocs. This confusion is the result of the shortcut for the htdocs folder residing in XAMPP.
Htdocs.png

3. Rename the extracted OpenEMR folder that you just moved as "openemr"

IE from openemr-5.0.0 to openemr

4. Delete the /Applications/XAMPP/xamppfiles/lib/php/Cpdf.php file.

If you're curious as to why, see this discussion for more information.

WEB GUI

1. Open up Web browser and point it to the installation script at http://localhost/openemr .

The first screen gives some general instructions and ensures file and directory permissions are set up correctly. It should tell you all your file system permissions are good, and have a 'Continue' button on the bottom of the form. If it does, click the 'Continue' button. Otherwise, if there are errors on this screen, then follow instructions to fix. (screenshot below)
Install-V4 0-1.png


2. The next page is 'OpenEMR Setup' 'Step 1', which asks whether setup should create the database.

Leave the setting set to 'Have setup create the database', and click the 'Continue' button. (screenshot below)
Install-V4 0-2.png


3. The next page is 'OpenEMR Setup' 'Step 2'. It has a list of options used to setup the database, along with OpenEMR user and OpenEMR path information.

Enter a 'Password' for the sql user, 'openemr', in the MySQL Server section; see first red rectangle.
Enter an 'Initial User Password' for 'Initial User', admin; see second red rectangle.
DO NOT make any other entries, besides the two above, in Step 2.

V4.0 5.png


4. The next page is 'OpenEMR Setup' 'Step 3'. On this page you should see logs of OpenEMR connecting and creating the database.

At the bottom of the page, it should read 'Next step will install and configure access controls (php-GACL).' Click the 'Continue' button. (screenshot below)
Install-V4 0-4.png


5. The next page is 'OpenEMR Setup' 'Step 4'. On this page, OpenEMR configures access controls (php-GACL).

You should see logs of OpenEMR installing and configuring php-GACL. you should see 'Success!' in green lettering four times. At the bottom of the page, it should read 'Next step will configure PHP.'. Click the 'Continue' button. (screenshot below)
Install-V4 0-5.png


6. The next page is 'OpenEMR Setup' 'Step 5'. On this page is displayed recommendations of how to configure your php.ini config file.

Read and follow the instructions carefully. At the bottom of the page, it should read "Next step will configure Apache web server.". We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)
Install-V4 0-6.png


7. The next page is 'OpenEMR Setup' 'Step 6'. On this page is displayed recommendations and warnings regarding directories Apache should NOT allow the outside world to see, as these directories contain Protected Health Information.

Read and follow the instructions carefully. We suggest you print this screen for future reference. Click the 'Continue' button. (screenshot below)
Install-V4 0-7.png


8. The next page is 'OpenEMR Setup'. This is the final configuration page.

This final installation screen gives additional instructions. This information is personalized for your setup, so we suggest you print this screen for future reference. At the bottom of the page is your OpenEMR username and password, along with a link to OpenEMR. (screenshot below)
Install-V4 0-8.png


OpenEMR after installation: (screenshot below)
OpenEMR-Login 4 1 1-2.png


Patch

Download the most recent patch. Instructions can be found on the OpenEMR Patches page.


Php.ini Settings

  • To set the time zone, find the time zone identifier here.
  • Go to Applications/XAMPP/xamppfiles/etc/php.ini (configuration settings), under Module Settings, change the continent and city if incorrect. Keep the forward slash after the continent and use the underline if there is a space in the name of the city. If there is a semicolon before date, delete the symbol.
  • Because the php.ini file is very extensive, enable line numbering in the text editor to facilitate locating and changing snippets. Note that timezone is on Line 1044.
  • While still in the php.ini file, make these changes as well to minimize future problems.
Php.ini.png


XAMPP Control

  • Go to Applications/XAMPP and open XAMPP Control to turn on Apache and MySQL.
Control.jpeg


  • Verify that Apache is running by typing localhost into the browser address bar.
Osxxampp.png


  • Verify that MySQL is running by navigating from left side bar to Tools and click phpMyAdmin.
Phpmyadmin1.png


Alternative

If you have difficulty installing OpenEMR with XAMPP, try this if you have Mountain Lion or Mavericks. It deploys the pre-installed Apache server (web hosting checked) with installation and configuration of MySQL and PHP.


Meaningful Use 2


Guide


Securing MySQL

  • Set only the MySQL root password.
  • Doing more than this can cause the disappearance of the database in phpMyAdmin!


How to manage MySQL security


Securing OpenEMR


Now you have a brand new EHR in your favorite operating system!!!


Happy2.png