Upgrade OpenEMR 2.8.2 Appliance To 2.8.3
Page Last modified:
10/02/07 01:25:22 AM
- LINK TO MANUAL IN PDF FORMAT
- Author: Brady Miller
- Email: brady@sparmy.com
- Discussion Board: http://www.oemr.org/modules/newbb/
Please, back up all of your data, and use these instructions at your own risk.
First, upgrade OpenEMR:
-
- Download
openemr-2.8.3.tar.gz (version 2.8.3) from sourceforge at:
http://sourceforge.net/project/showfiles.php?group_id=60081
- Enter below bolded instructions on command line as root user:
- #log into root
- su
- #Ensure the following lines are included at the end of the /etc/httpd/conf/httpd.conf file (this has been listed as a security patch in previous versions, and is required to not allow unauthorized viewing of patient's medical records).
- mcedit /etc/httpd/conf/httpd.conf
-
#Ensure below is included
at end of file (if not found, then paste below into end of
file)
- <Directory "/var/www/html/openemr/documents">
- order deny,allow
- Deny from all
- </Directory>
- <Directory "/var/www/html/openemr/edi">
- order deny,allow
- Deny from all
- </Directory>
- <Directory "/var/www/html/openemr/documents">
- TEXT EDITOR SAVE AND EXIT
- #restart apache
- service httpd restart
- #make backup directories
- mkdir /backupopenemrandfreeb/2_8_2
- #move old OpenEMR 2.8.2 to the backup directory
- mv /var/www/html/openemr /backupopenemrandfreeb/2_8_2/openemr
- #put the new OpenEMR 2.8.3 program in its place
- cd /var/www/html
- tar pxzvf /location/to/tar/openemr-2.8.3.tar.gz
- mv openemr-2.8.3 /var/www/html/openemr
- #secure OpenEMR
- chown -Rf root:root openemr
- #Need to change some file/folder permissions
- chown apache:apache -R /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
- chown apache:apache -R /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
- chown apache:apache -R /var/www/html/openemr/library/freeb
- chown apache:apache -R /var/www/html/openemr/edi
- #secure the /var/www/html/openemr/edi directory
- chmod -R 700 /var/www/html/openemr/edi
- #Restore the original scanned documents directory
- cp -fr /backupopenemrandfreeb/2_8_2/openemr/documents /var/www/html/openemr/
- #Change file-folder permissions of documents directory
- chown apache:apache -R /var/www/html/openemr/documents
- #Now for the hardest part of the upgrade; editing the new config files. There are five files that need to be compared to your old config files: openemr/interface/globals.php, openemr/library/sqlconf.php, openemr/library/sql-ledger.inc, openemr/includes/config.php, and openemr/library/acl.inc . The below instructions are specific for the openemr 2.8.2 appliance(only the bolded files above require changing or copying). If you have made your own changes to the config files, then I'd recommend comparing them to ensure no other changes are needed. We will replace one file with the previous 2.8.2 config file and will edit three of the new 2.8.3 config files.
- #replace new /var/www/html/openemr/library/sqlconf.php file with the old 2.8.2 file
- cp -f /backupopenemrandfreeb/2_8_2/openemr/library/sqlconf.php /var/www/html/openemr/library/sqlconf.php
- #edit file /var/www/html/openemr/interface/globals.php:
- mcedit /var/www/html/openemr/interface/globals.php
-
#edit the following bolded
variables :
- $webserver_root = "/var/www/html/openemr";
- $GLOBALS['concurrent_layout'] = false;
- $sl_dbname = 'openemr'; // sql-ledger database name
- $sl_dbpass = 'sql-ledger-password'; // sql-ledger database login password (click link for default above password, which is the PostgreSQL database password, and should be 'sqlledger' )
- $webserver_root = "/var/www/html/openemr";
- TEXT EDITOR SAVE AND EXIT
- #edit file /var/www/html/openemr/includes/config.php:
- mcedit /var/www/html/openemr/includes/config.php
-
#edit the following bolded
variables :
- $GLOBALS['oer_config']['ws_accounting']['enabled'] = true;
- $GLOBALS['oer_config']['ws_accounting']['username'] = "openemr";
- $GLOBALS['oer_config']['ws_accounting']['password'] = "openemrpassword"; (click link for default above password, which is sql-ledger 'openemr' user password, and should be “openemr”)
- $GLOBALS['oer_config']['ws_accounting']['url_path'] = "https://" .
- $_SERVER["SERVER_NAME"] . "/sql-ledger/login.pl";
- $GLOBALS['oer_config']['ws_accounting']['enabled'] = true;
- TEXT EDITOR SAVE AND EXIT
- #edit file /var/www/html/openemr/library/acl.inc:
- mcedit /var/www/html/openemr/library/acl.inc
-
#uncomment below line and
edit the bolded variable:
- $phpgacl_location = "/var/www/html/phpgacl";
- TEXT EDITOR SAVE AND EXIT
- #Backup the mysql database into backup directory.
- mkdir /backupopenemrandfreeb/2_8_2/mysqldatabase
- mysqldump --opt --all-databases | gzip > /backupopenemrandfreeb/2_8_2/mysqldatabase/mysql_backup.gz
- #Fix a bug in the mysql upgrade script
- mcedit /var/www/html/openemr/sql/2_8_2-to-2_8_3_upgrade.sql
-
#Delete below two
lines
- ALTER TABLE form_football_injury_audit
- ADD `fimatchtype` int(11) NOT NULL DEFAULT 0;
- ALTER TABLE form_football_injury_audit
- TEXT EDITOR SAVE AND EXIT
- #Upgrade the mysql database
- mysql openemr < /var/www/html/openemr/sql/2_8_2-to-2_8_3_upgrade.sql
- su
- Next, need to fix
the calendar bug with a patch. Download CalendarPatchMonth283.txt
file, which can be found at:
http://www.bradymd.com/CalendarPatchMonth283.txt (to download file, you may need to Right-Click the link and select 'Save Link As...')
- Enter below bolded instructions on command line as root user:
- #log into root
- su
- #apply the patch (note that the 'CalendarPatchMonth283.txt' file is being copied to file named 'default.html))
- cp -f /location/to/file/CalendarPatchMonth283.txt /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/month/default.html
- su
- #log into root
- Next, need to
upgrade the php-GACL access controls. Download acl_upgrade_1.txt
file, which is a php script. I wrote this script, and it seems to
work alright. File can be found at:
http://bradymd.com/acl_upgrade_1.txt
(to download file, you may need to Right-Click the link and select
'Save Link As...')
1. Enter below bolded instructions on command line as root user:
- #log into root
- su
- #copy upgrade script to openemr directory (note that the '.txt' is being changed to '.php')
- mv /location/to/file/acl_upgrade_1.txt /var/www/html/openemr/acl_upgrade_1.php
- #log into root
- 2. Run php-gacl upgrade script via : http://localhost/openemr/acl_upgrade_1.php
-

-
Ensure you got no
'ERRORS'. Close the window.
- OPTIONAL In the appliance, I left the traditional look of OpenEMR as the default. If you want to change to the new frames look(check out the demos to decide), then you will need to follow below instructions.
- #log into root
- su
- #OPTIONAL If you want to change to the new frames look(check out the demos to decide), then you will need to edit the file /var/www/html/openemr/interface/globals.php:
- mcedit /var/www/html/openemr/interface/globals.php
-
#edit the below bolded variable :
- $GLOBALS['concurrent_layout'] = true;
- TEXT EDITOR SAVE AND EXIT
- su
- #log into root
-
- Second, upgrade FreeB:
-
- Download freeb-0.13.tar.gz
(version 0.13) from sourceforge:
http://sourceforge.net/project/showfiles.php?group_id=60081
- Enter below bolded instructions on command line as root user:
- #log into root
- su
- #move old FreeB 0.12 to the backup directory
- mv /usr/share/freeb /backupopenemrandfreeb/2_8_2/freeb
- #put the new FreeB 0.13 program in its place
- cd /usr/share
- tar xzvf /location/to/tar/freeb-0.13.tar.gz
- mv freeb-* /usr/share/freeb
- #secure FreeB directory
- chown root:root -R /usr/share/freeb
- #fix a bug with Freeb permissions, and allow execution of the /usr/share/freeb/formatbin/ub92.pl file
- chmod +x /usr/share/freeb/formatbin/ub92.pl
- #create a directory that apache can write to
- mkdir /usr/share/freeb/public
- #restore original billing files(if they exist)
- cp -fr /backupopenemrandfreeb/2_8_2/freeb/public /usr/share/freeb/
- #Allow apache access to public directory
- chown apache:apache -R /usr/share/freeb/public
- #restart the freeb service
- service freeb stop
- service freeb start
- su
-
YOU ARE DONE