I have issues upgrading from 4.1.1 to 4.2.0 on an Ubuntu 10.04 machine.
I created a new Ubuntu machine with EMR 4.1.1 on it (clean install) to test if my upgrade process will work.
I loaded a backup file into 4.1.1 using the restore script (I had to rename the var/www/openemr/sites/default folder, otherwise, during upload of backup, it complained that this database allready excisted. I was unable in phpmyadmin to drop the database.
Once the backup is loaded in, everything still looks good, can still access the data etc. But then when I follow the upgrade instructions, I get this error pop up:
Package configuration, blue background with a gray box titled “configuring openemr” followed by the text:
ERROR
This package can not upgrade OpenEMR, because unable to confirm prescence of mysql credentials and/or database.
When I then try the command: sudo apt-get install -f
it doesnt do anything and that’s pretty much it. It also screws up phpmyadmin when I go into administration, other, database as I get the error “no session ID found!” Clearing the browser cache seems to help then.
What version of Ubuntu did you installed on the new device?
Did you install the 4.1.1 Ubuntu Debian Package on the new device? Check that the web directory is in var/www, not var/www/html.
Did you follow all steps to recover as explained here?
The restore script will drop the old database for you & there is no need to use phpMyAdmin. Can’t run the restore script without knowing the database password.
After everything has been properly transferred from the old device to the new, try upgrading; see this.
Ubuntu 10.04 LTS 64 bit. Yes i installed the 4.1.1 deb package, yes my web directory is var/www/openemr (not var/www/html). I did follow the steps for recovery. The restore went fine without errors and in accordance with the steps provided, and then I tried upgrading using that link and that’s where I get stuck. That’s where I get that popup screen with the error message.
Reason is that they currently run on Ubuntu 10.04 with 4.1.1 installed and I want to upgrade them to 14.04 with emr v 4.2.0.
So I created 2 new machines, one with 14.04 and emr v4.2.0 (for some reason I cannot get 4.1.1 to work on a ubuntu 14.04 URL not found). the second machine is ubuntu 10.04 with emr 4.1.1. I loaded the live data into this new ubuntu 10.04 machine with the same version as the live data. Then I wanted to upgrade it to 4.2.0 so the data and settings would be compatible with loading it into ubuntu 14.04 and emr 4.2.0.
I want to ensure my upgrade procedure doesn’t cost them down time so I am testing the upgrade process prior to actual change over.
Also, when I do a restore, I get the error saying: Site ‘default’ already excists in ‘var/www/openemr/sites’.
The way I get around this is to rename the current “default” folder first to defaultbackup and then do the restore.
Yes, excellent idea to test before touching the production copy. If anything goes wrong, it would be a poor reflection on support. Once a vendor accepts the money, he has a moral obligation to do the job properly & persist with the task even if it takes an inordinate amount of time & it turns out to be a money loser.
When you installed each Package, there is usually a prompt which asks the user to designate a root password & I think there is also a request to repeat it. Did you choose different passwords for each device or did you use the same password for all 3 devices?
During the upgrade process you should have been asked the MySQL root password associated with the install of the Package on the new device with 4.1.1/10.04. I think the reason for error.JPG is because an incorrect password had been supplied. The upgrade script can’t write to the database on this new device without the proper credential.
If all 3 devices have the same MySQL root password, then the only other possibility is that the database password, (found in openemr/sites/default/sqlconf.php) for user, openemr, had been used during upgrade instead of for user, root.
Starting with Ubuntu 14.04, the location of the web directory was moved to var/www/html. That’s the reason why the 4.1.1 Package cannot be shoe-horned into 14.04.
Let’s sort out the new device with 4.1.1/10.04 first. Check that you are using the correct password for the upgrade.
Thanks for the reply. Starting with the good news, thanks to your post I did realise that 14.04 web default is in the html folder, a quick adjustment in the apache2 configuration helped me getting 4.1.1 installed on Ubuntu 14.04. So for now, I got a 10.04 and a 14.04 with 4.1.1 and data load imported.
When upgrading, I do not get a prompt for credentials, after executing the dpkg command, it processes the deb file and then goes straight to this error message as in picture error.JPG. Error2.JPG is what I get after clicking OK.
I think the problem lies in credentials too (as per error message). When I run the restore script, it asks for a bunch of things (like site ID etc), I just hit enter all the time. Then when it asks me for the root password, I put in a password that seemed to work and completes the restore process. Now that password is different then found in the sqlconf.php file.
Not sure how to proceed from here. The password used in the sqlconf.php file does not match the root password used at the end of the restore procedure. Hope that helps you a bit.
At the upgrade procedure, when it asks for root password, is that the root password for the current machine I am on or the old machine? So if the root password on the old machine does not match the new machine, this will cause this error? How can I verify the root password of the old machine. I have no papertrail on that one.If not, should i change the root password on the old machine, then make a backup, then import it to the new machine and then run the update?
The sqlconf.php password is created by the OpenEMR installation process automatically (you had no part in it). It should be different for each of the 3 devices. This password is only used while running the restore script.
You should see this dialog with the last sentence “All done.” (minus the “Yippee!!!”), if the restore had been successful.
When you restored emr_backup.tar to the new 4.1.1/10.04, are you able to login? Did you get the error “no session ID found!” upon login as stated in your first post? If the answer is you could not login & you got that error, that tells you the restore of emr_backup.tar failed.
If that is the case, do you remember the MySQL root paswords for the new 4.1.1/10.04 device? If not, do the following:
delete the Package from the new 4.1.1/10.04 device.
reinstall the 4.1.1 Package to new device in Step 1 & write down the MySQL root password you chose during the reinstall.
Run the restore script very carefully, using the sqlconf.php password & the MySQL root password (Step 2) from the new 4.1.1/10.04 device (not from the old machine).
See if you can login to the new 4.1.1/10.04 device without errors.
If error-free login is possible, then run upgrade with MySQL root password you wrote down from Step 2.
Ok, I found the culprit, all working now. I knew I must be doing something wrong since not too many other people ran into this issue. This being said, I did everything from scratch again just to make sure I did not make the same mistakes. This time it worked. Somewhere down the line, as you stated, I must have entered the wrong database password during upgrading. Anyways, we’re all good now. I guess that’s why we make sure we don’t do this on live servers and test it out first
It’s not possible to restore the emr_backup.tar from 4.1.1 to the second new device if it has 4.2.0/14.04.
You must create a emr_backup_tar from first new device after it has been upgraded to 4.2.0, then restore it to the 4.2.0/14.04 device.
Restore script only works within the same version of OpenEMR, not across different versions.
Unlike the upgrade script, the restore script does not know how to leapfrog over different versions.
Good to remember when upgrading that the root pasword for the receiving device must be used. The user already had the “security clearance” to the old database when he created the emr_backup.tar. Now you want the new database’s “permission” for the upgrade script to get in & do the work.
Hence my two machines (started from scratch). Made a ubuntu 14.04 with v4.1.1 Restored the backup from the original machine onto it. Then upgrade it to 4.2.0 and now I both upgraded ubuntu and openEMR
Always happy when you make the right choice of testing it out on test servers before actually doing it. Thanks for the help.
I know, I’m a uber geek. But I frequently upgrade by installing a new version of say 4.2 and manually importing a 4.1 (or less) backup (overwriting the newly created 4.2 DB over the one I created)
Then you just go to openemr/admin.php and run the sql upgrade and sql patch scripts when prompted.
if you do that YOU are the one that sets the database name, it’s user and password at all times.
I would never use the default database name, user and pwd on a production system
Hi, would you mind going into detail on how to manually import the 4.1 backup. I assume that the backup to be imported was taken from the openemr administration->backup->create backup?
I am trying to migrate from a 4.1.1 appliance to 4.2.1, and need to keep the existing data, as well as the customizations if possible (additional forms, et cetera).
I am comfortable setting up linux (ubuntu 14.04) in a VM and installing openemr, it is the manual import of the backup with which I am less familiar.