OEMR V5, Patch 5 installation failure

(David D. Speck MD) #1

I just tried to install Patch 5 for OEMR Version 5 (under Windows, Xampp). I got the message:

“OpenEMR has already been installed. If you wish to force re-installation, then edit O:\xampp\htdocs\openemr\library\classes/…/…/sites/default/sqlconf.php (change the ‘config’ variable to 0), and re-run this script.”

Should I perform the above mentioned instructions and opt for re-installation? I don’t want to lose anything.

(Brady Miller) #2

Hi @Wizard353 ,
Don’t do that. First turn off xampp apache/mysql and back up your entire xampp directory. Then turn it back on try it again. Definitely should not do a reinstall, though. Lets see what happens on restart. And let us know the full web link you are using to go to the openemr login screen.

(David D. Speck MD) #3

I’ve double checked the contents of the downloaded Patch 5 Zip file, and the is a file called setup.php in it.

I unpacked the contents of the zip file into the appropriate directories, and verified that they were in the right locations.

I invoked it with:


(David D. Speck MD) #4

I stopped and restarted MySQL and Apache. OEMR Still wakes up as version

(Brady Miller) #5

Hi @Wizard353 ,
Note should not use setup.php in the link. This script is used to create multisites. To login to openemr, should just use localhost/openemr
(as an aside, patch 5 is a critical security patch that is fixing a security vulnerability in setup.php; details of this vulnerability will likely be released in the near future via CVE)

(David D. Speck MD) #6

OK, so what, if anything, do I need to do to invoke the upgrade from to, or is just copying over the newest files and restarting sufficient?

(Brady Miller) #7

That means the patch did not take. Can you paste your version.php script, which is in main openemr, here?

(Brady Miller) #8

Also, make sure you followed these isntructions:

(David D. Speck MD) #9

This is the version.php script, which was copied over from the patch .ZIP file, as it resides in my Xampp directory.

<?php // Software version identification. // This is used for display purposes, and also the major/minor/patch // numbers are stored in the database and used to determine which sql // upgrade file is the starting point for the next upgrade. $v_major = '5'; $v_minor = '0'; $v_patch = '0'; $v_tag = ''; // minor revision number, should be empty for production releases // A real patch identifier. This is incremented when we release a patch for a // production release. Note the above $v_patch variable is a misnomer and actually // stores release version information. $v_realpatch = '5'; // Database version identifier, this is to be incremented whenever there // is a database change in the course of development. It is used // internally to determine when a database upgrade is needed. // $v_database = 206; // Access control version identifier, this is to be incremented whenever there // is a access control change in the course of development. It is used // during installation to determine what the installed version of the access // controls is (subsequently the acl_upgrade.php script then is used to // upgrade and track this value) // $v_acl = 3; //Offsite Portal SOAP functions version, which are at myportal directory. $v_offsite_portal='1.47'; // Version for JavaScript and stylesheet includes. Increment whenever a .js or .css file changes. // Also whenever you change a .js or .css file, make sure that all URLs referencing it // end with "?v=$v_js_includes". Search the code for examples of doing this. // All this is to keep browsers from using an older cached version. // Need to assign it as a global below to work in template scripts. $v_js_includes = 20; // Do note modify below $GLOBALS['v_js_includes'] = $v_js_includes; ?>

(David D. Speck MD) #10

When I executed the command following the command on the specified page,


I got the message that Patch 3 had been installed.

Should there not have been a more recent version of the squ-patch.php file?

(Brady Miller) #11

ok, that looks good. ensure you also run the patch upgrade script in web browser after you unzip the files:
Then you should be good :smile:

(Brady Miller) #12

Interesting. your version.php shows $v_realpatch = ‘5’, so that means you brought in the patch files correctly. This means that sql_patch.php should bring in patch 5. Can you try it again?

(Brady Miller) #13

It should look like this:

(David D. Speck MD) #14

No joy. OEMR still wakes up as version
The sql-patch screen comes up as:

(Brady Miller) #15

Whoa, there’s a lot more going on than an issue with the patch. Your apache is not processing the php, which is very odd. Did this work previously?

(Brady Miller) #16

It looks like windows is not running this in your web browser (http) but as a file (file). try this link:

(David D. Speck MD) #17

I used the same procedure when I upgraded the original installation to the patch.

(David D. Speck MD) #18

Ran this time with properly formatted results output, but says that Patch 3 has been successfully installed.

(Brady Miller) #19

Next thing is to make sure (this is a common mistake) that you copied the new patch file to the actual openemr directory that is being served by xampp. It’s not uncommon for folks to make different xampp dirs on their computer and forget the one that is actually being used(ie. served).

(David D. Speck MD) #20

There is only one xampp directory on the server. I’ve renamed that one and am restoring now from Friday night’s backup. It will take a while. I’ll try again from scratch and let you know how it works.