Update from openemr 2.7.3 to 3.0.1

okhra wrote on Monday, August 03, 2009:

Hi,
I have a pediatric practice which has been running version 2.7.3 since 2005 and haven’t kept updated to newer versions, since they were happy with the system.If it’s ain’t broke don’t fix it- philosophy. Now, I am looking at updating to version 3.0.1.
My sincere apologies for not keeping up to date. Anything I should watch for ? I am hoping I would invoke all the updates (sqls) version to version. Another issue may be moving stuffs from postgres to mysql and getting rid of freeb.
I’d greatly appreciate some guidance and warnings that I should heed to .
- balu raman

cfapress wrote on Monday, August 03, 2009:

Balu,

If I were you, I’d set aside at least 6 hours to do the upgrade. You have some major changes to make such as:
* database conversion from PostgreSQL
* database upgrades, one at a time
* security model upgrade to phpgacl
* new configuration options including the menu structure, calendar style, and theme

Jason

okhra wrote on Monday, August 03, 2009:

Jason,
Thanks. I’ll probably spend a whole weekend on this, if necessary. I am typically slow, patient and careful, aka OLD from punched card era !. Any hiccups I should be aware of from folks who have gone through updates ( not in full lump ) ?
Of course, I have to read about phpgacl as I lack maturity in that.
- balu raman

drbowen wrote on Monday, August 03, 2009:

Dear balu raman:

There is a very extensive discussion on upgrading from an older version here:

http://sourceforge.net/forum/forum.php?thread_id=3272583&forum_id=202505

I recently upgraded from 2.8.2-dev to 3.0.1.  It wasn’t easy.

Is the site using SQL-Ledger?

Are they using FreeB?

My upgrade from 2.8.2-dev to 3.0.1 was without FreeB and without SQL Ledger.  These will increase the complexity.

Sam Bowen, MD

bradymiller wrote on Tuesday, August 04, 2009:

hey,

From reading this thread, I’m assuming the below:
php-gacl (not installed)
sql-ledger/freeb (installed)

Although you have sql-ledger on postgresql, there is a script to merge this into openemr. If you indeed don’t have php-gacl installed, then this will simplify upgrade.

I’d suggest copying system to a test server, and attempting to upgrade it all at once. Will learn along the way, and will perhaps get “lucky”. You also need to have a user with ‘admin’ username.

Overall strategy:
I. Replace openemr web directory with new version
II.  Upgrade openemr sql database
III. Configure openemr’s config files
IV. Install embedded php-gacl
V. Merge sql-ledger into openemr
VI. Finish up configuration via config files

Steps:
1) Move old openemr directory to a backup directory 
2) Move new version into openemr directory 
3) Copy openemr/library/sqlconf.php file variables from old version into the new version 
4) Edit openemr/interface/globals.php (set $webserver_root and $web_root to be same as old version) 
5) Open up your openemr/library/sqlconf.php file and note the variables for host, login, pass, and dbase variables (I’d suggest writing these on a piece of paper in the order listed). Then place these values (with above ordering) in the corresponding blank variables found in openemr/gacl/gacl.ini.php (host, user, password, name) and openemr/gacl/gacl.class.php (db_host, db_user, db_password, db_name). Don’t touch anything else in these files.
6) Open sql_upgrade.php in browser and follow instructions (this will upgrade your sql database), select 2.7.3.
7) Open in browser openemr/gacl/setup.php (installs new embedded php-gacl tables)
8) Open in browser openemr/acl_setup.php (configure php-gacl for openemr - this script also makes admin access for the ‘admin’ user. This is why you should make an admin user before the upgrade.)

9) Now for transitioning sql-ledger stuff into openemr:
#edit file /var/www/html/openemr/interface/globals.php:
mcedit /var/www/html/openemr/interface/globals.php
#edit the following bolded variables :
$sl_dbname = ‘openemr’; // (put value from your previous version)
$sl_dbuser = ‘sql-ledger’; // (put value from your previous version)
$sl_dbpass = ‘sql-ledger-password’; // (put value from your previous version)
TEXT EDITOR SAVE AND EXIT

Open in browser openemr/sl_convert.php (should merge stuff from sql-ledger into openemr)

10) Configure optional settings in interface/globals.php and includes/config.php files

Again, definitely try it in a test server first.

-brady

bradymiller wrote on Tuesday, August 04, 2009:

hey,
Also forgot after step 2, should copy over the /documents directory from your old openemr version to the new openemr version.
-brady