Sql_upgrade problem

Ok, I am in the process of upgrading from 4.2.0 to 5.0. The upgrade went fine on the test machine but when I use the sql-upgrade function to update the most up to date back up from 4.2.0, I just get a blank screen. I have been searching the forum without success. So, I start everything all over. I had to reinstall Ubuntu 16LTS, Lamp, etc… The same thing again. So I had to rebuild again because one can’t just uninstall OpenEMR and reinstall. This time, instead of installing 5.0, I went to 4.2.2 first. It worked great. sql_upgrade was abd to update the database from 4.2.0. But when I upgrade to 5.0, same problem again. Just a blank screen when I use sql_upgrade.

Now, I just rebuild the system and installed 4.2.2. Now, I have the same problem as when I use sql_upgrade in the 5.0 version. Anyone know what’s missing?

hi @CalvinTy ,

Note that sometimes customization of sql tables etc. can cause issues such as discussed here:

As a first step in figuring this out, are you seeing any errors in the php error log?

-brady

Thank you for the reply. the error log says PHP fatal error: Failed opening required ‘/var/www/openemr/sql_upgrade.php’ (include_path=’.:/usr/share/php’) in Unknown on line 0.

I have looked at the suggested link above. I don’t know what permission people were talking about. Is it to www-data or something like that?

Thanks again

@CalvinTy,
Can you please check whether the path of the files specified in require_once() is correct or not in the sql_upgrade.php file. It may also causes that PHP fatal error.

Thanks,
ViSolve

They’re there

require_once(‘interface/globals.php’);
require_once(‘library/sql.inc’);
require_once(‘library/sql_upgrade_fx.php’);

Are permissions for the openemr folder set correctly?
Run

ls -l /var/www/openemr

or wherever the openemr installation folder is.

I think so… Everything is under root, not www-data like it used to be