Blank login after applying patch: Class 'OpenEMR\\Core\\Header' not found

Using Ubuntu 16.04

After applying 2nd patch for OpenEMR 5.0.2 the login would no longer work. It presents blank page at /interface/login/login.php?site=default.

Apache error log shows:
[:error] [pid 20437] [client 2600:1700:152:2640:a128:4951:ec60:3cf9:49894] PHP Fatal error: Uncaught Error: Class ‘OpenEMR\Core\Header’ not found in /var/www/openemr/interface/login/login.php:102\nStack trace:\n#0 {main}\n thrown in /var/www/openemr/interface/login/login.php on line 102

PHP is not my game and I figure there is something very simple missing or misdirected in my installation. I do not want to reinstall as afraid that will wipe all previous work.

Any ideas? Thanks.

Hi Tony,
First, make sure you have copied all required files for patch 2. If you custom coded some things in OpenEMR be sure to back them up and also make sure to backup the sites directory as that has all the patient files in it. Next be sure to set the correct file permissions for OpenEMR as that usually is the reason why files aren’t found. Let me know if that fixes anything.

Thanks Tyler.

All worked fine until patch 2 applied and subsequently application of patch 3 did not fix it.

I do not have any custom code, so that should not be an issue. Patient records are not critical today - only dummy records.

The openemr directory and subs had root owner:group. I changed all owner:group to www-data. I could not find explicit instructions on website on setting permissions, owners, groups.

drwxr-xr-x 26 www-data www-data 4096 May 19 21:29 openemr

This did not correct the login and I still get the same error Class ‘OpenEMR\Core\Header’ not found.

Any other ideas?

Were you using the admin.php script by any chance? It gets deleted by the patch. I had to replace it. The patch also replaces a few other files with blank files.
I remember this happened to me with the second patch. I just put the blank files back in.


Thanks Sandra. Thanks Tyler.

I reinstalled 5.0.2 and copied back my sites, etc. All is working now. Not sure where I stepped into it.

Thanks for your help.


Sure, np. I only know, cuz I learned it the hard way. Lol