Ubuntu 14.4 End Of Life and 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.

I have the new server up and runniing and I am now tyring to the get backup file on the server. I am tyro at this and seems to not be working so well - trying to ssh it in but using putty I keep getting no file is found… gonna try DVD next… so once i have it is do not use the restore script?

To update database. I am unsure what the table name is - new to mysql and I do not know the command to slow the scolling so I cannot see the top of the table llisting for the update. Any advice. I have searched the web but no obvious solution yet. The command to import the data in mysql requires the tablename

Good morning we are still down but making progress. I have attempted to restore and I gen an error - it says Site ‘default’ already exists in ‘/var/www/openemr/sites’. Should delete this file or what ?

thanks

Stephen,

Looks like I’m getting closer, but still not quite there.

5.0.2 Install went ok
sql import and upgrade reported no errors
Copied documents, edi, ira to the new /var/www/html/openemr/sites/default/documents
However the command lines given in the upgrade guide call for a / at the end of each line, as in;
cp -r openemr_bk/sites/default/documents openemr/sites/default/
which would create a situation where the files would be copied to;
/var/www/html/openemr/sites/default/documents/documents
instead of
/var/www/html/openemr/sites/default/documents (which is where they are now)
In any case the calendar looks good, patients records show this error upon opening;

I tried changing the ownership of the numbered folders in the documents directory to www-data:www-data and the permissions to 0700 (which is what they were in the old system, but that didn’t do it.

Whats next?,

Today, after much help from the wonderful folks on this forum we cleared the last big hurdle (billing) and were able to submit acceptable Florida Blue claims. This marked the successful migration of OpenEMR v4.2.0 on Ubuntu14.04 to v5.0.2 on 18.04. There were many twists and turns (and a couple total reloads) but the end result is a pair of servers (one in the office & one at home) that stay in sync and are performing their much needed tasks of serving our doctors, their staff and 3,600+ patients. We owe much to the entire OpenEMR community, and to pay some of that back, I am donating a step-by-step how to guide compiled during the upgrade project to anyone who asks for it. If you need to update your 4.x versions to the new 5.0.2 and get on 18.04 at the same time, you may find this useful. I am going through the final editing and proof reading now and it will be available on May 20th. I’m re-testing the whole procedure using Ubuntu 20.04 this weekend and if it flies, I’ll put that in as well. Message me here if you’re interested in getting your hands on it. @hitechelp

1 Like

The Conversion guide I’ve been working on is complete and can be downloaded from my Gdrive Here
Those who are still stuck on v4.x.x and Ubuntu 14.04 now have a step-by-step procedure to get themselves up-to-date on Ubuntu 18.04 and OpenEMR v5.0.2 The guide also has extra features that I’ve developed over the years to help me be a better sysadmin and work smarter not harder. It includes; how to set up an off-site backup server and keep it in sync with your production server. How to set up and use Apache Logs Viewer to quickly screen your logs for hack attempts. How to set up an APC UPS and have it warn you via e-mail when the power goes out. How to warn off would by interlopers with a scary looking warning page and other bits and pieces. Best of luck to everyone and stay safe. @hitechelp

1 Like