Upgrade from dev.2.3.8

drgmorrow wrote on Tuesday, February 28, 2012:

How do I upgrade from dev-2.3.8 to current version?  A set of scripts I can run?  The existing system is running on a gentoo linux system.

bradymiller wrote on Wednesday, February 29, 2012:

Hi,

Assume you mean 2.8.3. As an aside, we have a cool history of the versions laid out on the OpenEMR wikipedia entry:
http://en.wikipedia.org/wiki/OpenEMR#Releases

The way to upgrade from 2.x versions depend on answers t the following questions:
1. Do you have an ‘admin’ user with administrator access?
2. Do you have php-gacl installed?
3. Do you have sql-ledger installed?

If know the answer to those questions, can then provide instructions on how to upgrade. And is important to upgrade on a testing instance first before upgrading your production server.

-brady

bradymiller wrote on Wednesday, February 29, 2012:

sorry, didn’t mean to type the open-emr link twice.

drgmorrow wrote on Friday, March 02, 2012:

Yes admin access is available.
Yes php-gacl is installed
Yes sql-ledger is installed

bradymiller wrote on Friday, March 02, 2012:

Hi,

Please confirm the version is 2.8.3-dev, which means you will use 2.8.2 when choosing the upgrade script.

Then will need to deal with php-gacl and sql-ledger. To get an idea of how to do this see the following intructions for upgrading the Appliance from 2.8.3 to 3.0.1:
http://www.bradymd.com/appliance/update3/
(specifically steps 1-5)

Again, need to do this on a testing instance of your OpenEMR first, and my suggestion is to first try to do it on one swipe (ie. one upgrade from 2.8.2 to 4.1.0. And when you get it to work on the testing instance, then back up your production instance before proceeding:

1) Move old openemr directory to a backup directory

2) Move new version into openemr directory

3) Copy following directories from old version to new /openemr/sites/default/ directory:
/openemr/documents -> /openemr/sites/default/documents
/openemr/edi -> /openemr/sites/default/edi
/openemr/era -> /openemr/sites/default/era
openemr/custom/letter_templates -> /openemr/sites/default/letter_templates

4) Open up you openemr/sites/default/sqlconf.php file and transfer the variables from your old openemr version (was at openemr/library/sqlvonf.php in previous version) here

5) In the openemr/sites/default/sqlconf.php file, set the $config variable (found near bottom of file within bunch of slashes) to 1 ($config = 1;).

6) Place the gacl_ prefix on all tables in your php-gacl database (I put a link to a php hack that will do this at bottom of this message)

7) Save your modified php-gacl database to a mysql backup file (use ‘mysqldump’ command)

8) Restore the gacl database backup file into your openemr database (use ‘mysql’ command) (thus you have now combined the gacl and openemr databases)

9) Open sql_upgrade.php in browser and follow instructions and put version 2.8.2 there (this will upgrade your sql database)

10) Open openemr/acl_upgrade.php in browser (this will upgrade your gacl)

11) Migrate the sql-ledger data to OpenEMR (so, will no longer use sql-ledger) by opening openemr/sl_convert.php in browser

11) Login into OpenEMR and configure optional settings within OpenEMR in Administration->Globals

Here’s the link to the custom php hack that will put prefix on your tables:
http://bradymd.com/prefixMod.tar.gz
Unpackage, then place on your server and run it through your browser. For ‘Enter New Prefix’ ensure you put ‘gacl’. And again your gonna put your gacl database name for ‘Enter database name:’. Remember to remove this script when you are done.

I’d suggest making a testing server to try/retry this until you get it to work. Then when get it working from start to finish, can upgrade your productions versions.

Some things to note in above instructions:

-do the gacl migration before the sql_upgrade.php script. In upgrade from 3.0.1 to 3.1.0 some changes are made to the gacl tables to ensure compatible with UTU-8 (note it doesn’t convert to UTF-8, it just makes it compatible with a conversion if a user chooses to do this at some point)

  • Do not edit any of the gacl config files (in 3.1.0 this is no longer needed; they grab needed stuff from library/sqlconf.php)

- Ensure before you upgrade that you indeed do have an ‘admin’ user in the php-gacl program (in the older versions, an authorized user in openemr can look the same as a authorized user in php-gacl; you could also get away with not having the user in php-gacl. This is no longer case in 3.0+, which is why you may not be able to log in as admin)

Let us know if have any problems.

-brady