5.02 to 6.0 Upgrade Issue

Situation Unable to do the Upgrade

I could not find any upgrade instructions for Ubuntu?

So, I tried the Linux instructions, but they don’t work on Ubuntu.
When you get to step 6. running sql_upgrade.php file returns the error; “PHP version needs to be at least 7.3.0.” and after upgrading the PHP to version 7.3.24, and rebooting the server, the same error occurs.

After some poking around on the Wiki I find this on the OpenEMR Upgrade Guides Page:

Ubuntu/Debian/Mint OpenEMR package

            No longer supported. 

NOW WHAT ARE WE SUPPOSED TO DO? (yeah, I’m upset)

You have got to give us some viable open source O/S option here, we are supporting over 3,600 patients with our system. Windows is not an option. Inherently insecure and cannot be made secure.

After 10 years of running OpenEMR on Ubuntu, without prior warning, you just drop support for Ubuntu? What is up with that.
I wonder how many more of us are now left hanging out to dry?

What alternatives do we have now?

What many seem to forget is that OpenEMR is maintained by volunteers with many contribution to the project done freely with nothing but good intentions and a willingness to help those folks that may not have the financial resources to implement a professionally developed private application.

Between managing cloud and docker support, demo farms, building patches and releases, ONC 2015, modernizing, supporting many OS’s, both Maria and Mysql, ever changing PHP versioning and much more, something has to give!

In this case, Brady in the past has maintained the Ubuntu deb package. This is becoming more and more difficult with every Ubuntu version. So it has been decided to drop that support.

Options would be to install OpenEMR as many do ie. via our upgrade or install process.
Ubuntu is still supported but not using a deb package as in the past.

1 Like

Updated the documentation on wiki to be more clear (ie. we have not dropped support for ubuntu, we just no longer have deb packages):
https://www.open-emr.org/wiki/index.php/OpenEMR_Upgrade_Guides#Ubuntu.2FDebian.2FMint_OpenEMR_package

1 Like

Ok, that’s a huge relief.

My sincere apologies for going into a tailspin too soon,
I found that blurb about “No Longer Supported” and I saw us all going down in flames!

However, I still can’t get the Linux upgrade to run. I’ve upgraded the server to PHP v8.0.3
Where is OpenEmr getting its php version info from? “PHP version needs to be at least 7.3.0.” error persists after upgrading PHP twice. I can’t find the “/src/Common/Compatibility/Checker.php” file that is listed in the sql_upgrade.php file.
php -v returns "PHP 8.0.3 (cli)

hi @hitechelp , Recommend making a quick script in your openemr base directory with just <?php phpinfo(); ?> in it and then going to it in your browser to confirm the correct php version is being used by apache.

First disable current php version module.
sudo a2dismod php7.2 or php5.6
then enable version you want
sudo a2enmod php8

or however your versions are named.

also from command line do php -v to get the cli version which should track runtime.

I’m going to add to and maybe repeat what some have said here about PHP versions. Here are some concepts that took me a minute to figure out so I hope I can help you and future readers avoid heartache when dealing with versions.

First, there are “two” php’s when it comes to your server. There is the CLI (Command Line Interface) version and the version that runs your browser. It is possible to be running PHP 8.0 on the CLI and also be running PHP 5.6 on your web browser. You need to check both versions based on what you are trying to get done.

To get the version that your CLI is running, in the command prompt type “php -v”. You should see something like this:

To see the version that your web browser is running, create a new file in your html directory and put “phpinfo()” as the only line. After you are done remove this file because it has a lot of information about your server that you do not want public.

When I use Jerry’s instructions to change my php version (Remember, you must restart apache server after making these changes!)

sudo a2dismod php7.4
sudo a2enmod php8.0
sudo service apache2 restart

my phpinfo() page shows the following:

but from my command line the CLI version is still php 7.4:

If I want to change the CLI version you must use the “update-alternatives --set php /usr/bin/phpx.x” to get the change. Such as so:

$ sudo update-alternatives --set php /usr/bin/php8.0
$ sudo update-alternatives --set phar /usr/bin/phar8.0
$ sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0

In the following screenshot I use the update-alternatives and at the end I use php -v to show the new CLI version:

And remember, always restart apache for the changes to take affect

1 Like

thanks @growlingflea
It’s the forgetting to enable new version after upgrade that always gets me.
No matter how many times I tell myself, I won’t forget that again. Then I do!:slight_smile:

1 Like

Thank you for taking me back to school.
I’ll try this again with your help.

Regards,
David

Ok, got the upgrade to run after using Brady’s php script to verify browser is indeed PHP 8.0 (same as CLI)

But, an hour and a half into it I got this; Please advise.

Also the Apache2 error log had this to say;

[Sat Mar 27 09:09:14.611621 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “enable_database_connection_pooling” in /var/www/html/openemr/interface/globals.php on line 502, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:14.613486 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:14.613900 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:14.619845 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:15.420653 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “enable_database_connection_pooling” in /var/www/html/openemr/interface/globals.php on line 502, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:15.423207 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:15.423687 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:15.430730 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:16.248763 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “enable_database_connection_pooling” in /var/www/html/openemr/interface/globals.php on line 502, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:16.250976 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:16.251545 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:16.258897 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.065405 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.067637 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “enable_database_connection_pooling” in /var/www/html/openemr/interface/globals.php on line 502, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.070298 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.070895 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.079388 2021] [php:warn] [pid 9710] [client 192.168.1.125:51470] PHP Warning: Undefined array key “gbl_force_log_breakglass” in /var/www/html/openemr/src/Common/Logging/EventAuditLogger.php on line 550, referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.098941 2021] [php:notice] [pid 9710] [client 192.168.1.125:51470] OpenEMR Error : OpenEMR is potentially not secure because CSRF key is empty., referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.099003 2021] [php:notice] [pid 9710] [client 192.168.1.125:51470] OpenEMR Error : OpenEMR is potentially not secure because CSRF token was not formed correctly., referer: http://192.168.1.100/openemr/sql_upgrade.php
[Sat Mar 27 09:09:17.126016 2021] [php:notice] [pid 9710] [client 192.168.1.125:51470] OpenEMR CSRF token authentication error, referer: http://192.168.1.100/openemr/sql_upgrade.php

What’s with 10% - same as this.

@hitechelp
The top panel is just to show current activity on server and is a separate process. It has no bearing on the upgrade process and is there just to let user know they are not hung up on those long running requests.

So as the error says, doesn’t affect the upgrade. Unsure why error happens on long running upgrades.

It may save lot of these posts if on CSRF error (probably timeout or session expiry), there is a link to refresh/restart the status monitoring - even if it just says still adding guids to encounters.

should be able to click green button that starts and stops status. should have made error a warning color but, can’t think of everything in the moment.

Ok, we got through it and it appears to be good so far.
Now, where do I put our custom login-logo.gif? The location has been changed in v6.0.

Oh drat, the file is a .png not a .gif and it was formerly located in the /openemr/public/images folder.