Ubuntu 14.4 End Of Life and OpenEMR

Situation
How to get my server operating system (OS) up-to-date, i.e. to Ubuntu 18.4 or even 16.4 would be ok.
As Ubuntu 14.4 (aka Trusty Tahr) approaches end of life (EOL) which is 30 April, 2019, we are faced with either paying Canonical for extended security maintenance (ESM) or upgrading our OS. Needless to say the OS upgrade is the desired path.

However, the OS upgrade has been an exercise in futility. At this point we’re facing the ESM fees because we have yet to discover how to migrate OpenEMR to a current Ubuntu OS.

I’ve read everything I can find and tried everything I can think of without succeeding in getting a usable system on 16.4.

  1. Running “do-release-upgrade”
    This ends with errors indicating it can’t update the OpenEMR package and a disk that won’t boot.

  2. Running the 4.2.2 package upgrade with PHP5 to get the database up to speed in hopes we can create a backup that we can restore to a fresh 4.2.2 install on 16.4 but the restore fails.

  3. Ran the 5.0.0 package upgrade with PHP5 and made a backup but it will not restore to a 5.0.0 on 16.4 either.

Since we can’t run the Upgrade packages that use PHP7 how are we supposed to get off 14.4?

OpenEMR Version
I’m using OpenEMR version 4.2.0(4)

Browser:
I’m using: FireFox 60.6.1esr (32-bit)

Operating System
I’m using: Ubuntu 14.4

Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability
Logs unobtainable after updater crashed and left the encrypted disk unrecoverable.

I am having the same problem. My back up data files were not tested and appear to not be restorable. It looks like they should have been back up tto a tar.gz extension and that did not happen. I used a ubuntu 14.4 Installation CD and was able to get into the secured file enough to make a backup. using `tar -zcvf. See this link https://www.cyberciti.biz/faq/how-do-i-compress-a-whole-linux-or-unix-directory/. Otherwise I would not be able to get to any of my data. I plan to do a fresh install of 14.4 and updgrade. Once stable I will try to restore the openemr tarball that I created. I will keep you posted. I put a couple of questions up and I am still waiting for some answers but I think there are a few issues with the Ubuntu upgrade and the openemr backup application. Best to do a backup of the entire openemr directory and maybe someone will figure out how to get it in if I do not. Meanwhile you may be able to a least get to yout data and save it.

instead of running the ubuntu upgrade it’s probably easiest to buy a new server

then you can practice the OpenEMR upgrade with a backup from ubuntu 14 until you are comfortable

Tyran, Stephen
I have no issues as far as backup goes. I haven’t used the built in backup in several years.
I keep a primary and an offsite backup server in sync via private key encrypted rsync.
I clone the backup’s hdd when I need a test bed.

The problem (and do correct me if wrong) appears to be that no provisions were made for the EOL of 14.4 and now the incompatibility of components of OEMR such as PHP between versions has negatively impacted the ability of long term users (like us) to move OEMR to a newer OS. A new OMER on an EOL OS is less than optimal. Just need a way to get up to date for both the OS and OpenEMR.

I will be eager to assist anyone who steps up to take this on, everything we’ve built since 2011 is riding on this.

I have a test bed that was upgraded using openemr-php5_5.0.0-2_all.deb still on 14.4 under test while working our custom mods into 5.0.0.

Regards,
David

Oh by the way, I just checked with Canonical and the ESR Support is $750.00 per year (but there is a $2,500.00 cart minimum) so I’m definitely not interested in going that route.

hi @hitechelp, have you thought about purchasing a server as the next step in your migration? Then you could practice the upgrade process with a backup of OpenEMR.

Okay everyone. I am uo and running again;

  1. I resinstalled my Ubunut 14.4
  2. I used the restore script to restore the openemr backup.
  3. I upgraded Openemr to 5.0,’
  4. I then backed this file up in two separate locations
  5. Foolish me I decided to give the Ubuntu 14.4- 16.4 upgrade and it crashed - clearly there is a bug here when it comes to Openemr as it freeze trying to delete the www directory.
  6. I idid a clean install of 16.4
  7. I ther restored the Openemr 5.0 file.

At first it looked as if the backups had non properly exected. But I noticed when I butn to disks they do not work and I cannot explaint when. Insead I used a eternal hard drive and swapped it back to the surver and just mounted it and the file were all at there. I hopes this helps

T

Hi @leader,
I already have two new servers, but how will that be of any help if there is no way to migrate OpenEMR 4.2.0 from Ubuntu 14.4 to 16.4 or 18.4? Surely someone else has done this already. Those still on 14.4 will need to get to a current OS before June when the security updates for 14.4 end. Still looking for an answer.

it’s possible to upgrade 4.2.0 to 5.0.1 on ubuntu 18, there’s plenty of guides online for settingup multiple php versions

That’s good, are there any instructions?

guides above is a link to one, btw, did you try this

Stephen,
Sorry for the long delay, I read through the links you posted and doing much trial and error testing over the past two months however, still not seeing how running multiple PHP versions on virtual servers gets us from OEMR 4.2.0 on 14.4 with PHP5 to OEMR 5.01 on 16.4 or 18.4 with PHP7 Can you be a bit more specific on how to accomplish this seemingly magic feat? From my experience I can say for certain that any OEMR backup created on a 14.4 server with PHP5x will not restore and run on a 16.4 or 18.4 server because those OS’s come with PHP7x and thus not backwards compatible with 5.6-5.9 versions of PHP used in 4.2.0 - 4.2.2. So what am I missing here?

hi @hitechelp, easiest way would be to install a brand new openemr 5.0.1 on your brand new server running your favorite os, then you’ll use a mysql command line to import the backup of your 4.2 database after you drop the newly created database, something like
mysql -uroot -ppass
MariaDB [(none)]> drop database openemr;
MariaDB [(none)]> create database openemr;
MariaDB [(none)]> quit;
mysql -uroot -ppass openemr < openemr4.2database.sql

then run sql_upgrade to upgrade the database of your new server, then copy your old 4.2 pertinent sites folders like documents, edi, etc, into the new openemr 5.0.1 directory and finally update the fresh 5.0.1 php scripts with any of your 4.2 customized code that differs from the community version you just installed

Good day,

I am a total noob who had a system installed a few years ago. It was installed on 14.04 and i would have a student do a backup once a week. I have been able to restore backups in the past so have been comfortable however only recently it came to my attention that 14.04 is EOL. I know I was negligent as my IT guys in Jamaica arent that up on Ubuntu so I just approached it as if it aint broke… However i now realize I need to update and ensure my patient information is safe and current. All that to say could you please in simple terms layout how i could do what you suggested. I am not too familiar with ubuntu but i can follow instructions. Thanks in advance

hi @Rhys_Pieces, the above instructions

replace steps 1 and 2 of this guide
so try that and then pick up the guide on step 3 please

Thanks. will give it a try.

Clif, did that work for you?

It didn’t work for me.

After installing and configuring Ubuntu Server v18.04.1 on a new server
OpenEMR v5.0.1 was successfully installed and configured using the file; openemr-php7_5.0.1-4_all.deb
At this point, I could log into OpenEMR and see that it appeared to be working although there was obviously none of our patient data yet.
***Up to this point all seemed well, the problems appeared when running the sql upgrade as in the following line:

Open openemr/sql_upgrade.php (http://localhost/openemr/sql_upgrade.php) in web browser, choose 5.0.1 and click ‘Upgrade Database’

***The resulting white page sat for six hours until I investigated the Apache2 error log and discovered this;
***[Sat Mar 28 21:34:35.066832 2020] [php7:error] [pid 25945] [client 192.168.1.123:57203] script ‘/var/www/openemr/sql_update.php’ not found or unable to stat
***[Sat Mar 28 21:34:35.368114 2020] [php7:warn] [pid 1345] [client 192.168.1.123:57224] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
***[Sat Mar 28 21:34:35.368213 2020] [php7:error] [pid 1345] [client 192.168.1.123:57224] PHP Fatal error: Unknown: Failed opening required ‘/var/www/openemr/sql_upgrade.php’ (include_path=’.:/usr/share/php’) in Unknown on line 0
***Assuming that I had made a mistake somewhere, I dropped the openemr database and at 03:16 rebooted the server and started the process again, the result is shown below.
[Sun Mar 29 03:24:14.248819 2020] [php7:warn] [pid 1309] [client 192.168.1.123:57295] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Sun Mar 29 03:24:14.249037 2020] [php7:error] [pid 1309] [client 192.168.1.123:57295] PHP Fatal error: Unknown: Failed opening required ‘/var/www/openemr/sql_upgrade.php’ (include_path=’.:/usr/share/php’) in Unknown on line 0

Been working this problem for a year now, yet to find the solution.

hi @hitechelp, key step missing is to start from a good backup and start by installing 5.0.2. This is a tweak on upgrading since you’re using a different server.

Follow the instructions installing 5.0.2 once you have it running you can then import your sql backup, usually use mysql command line
mysql -u root -p openemr < backup.sql
and next run the sql_upgrade.php to get your data accessible. Will need to finish with bringing over documents outlined in upgrade guide.

Thank you Stephen, I’ll give 5.0.2 a try. I’ll let you know what I find.