/var/www/openemr/library/log.inc at 49:sqlInsertClean_audit
/var/www/openemr/library/authentication/login_operations.php at 116:newEvent(login,admin,Default,1,success: 127.0.0.1)
/var/www/openemr/library/auth.inc at 50:validate_user_password(admin,,Default)
/var/www/openemr/interface/globals.php at 352:include_once(/var/www/openemr/library/auth.inc)
/var/www/openemr/interface/main/main_screen.php at 25:require_once(/var/www/openemr/interface/globals.php)
Is this recuperable?
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, thanks for your reply. I used the restore script. Please see terminal output below. I forgot to say that the above error is shown once I try to log in to OpenEMR in my browser.
robert@robert-VirtualBox:~$ sudo ./restore
[sudo] password for robert:
WARNING: This script is experimental.
It may have serious bugs or omissions.
Use it at your own risk!
Now you will be asked for the backup file.
By default this is named emr_backup.tar, although you may have saved it as something else.
Enter path/name of backup file: /home/robert/emr_backup_it.tar
Extracting /home/robert/emr_backup_it.tar ...
Extracting /tmp/emr_backup/openemr.tar.gz ...
Do you want to specify site ID, locations or database names for the restore? [N/y]
If you have a particular requirement for the UTF-8 collation to use,
then please specify it here. Hit Enter to accept the default 'utf8_general_ci'.
Enter 'none' if you do not want UTF-8.
UTF-8 collation [utf8_general_ci]?
Your Site ID will be 'italy'.
Only site-specific files will be restored to '/var/www/openemr/sites/italy' in the existing OpenEMR web directory.
I will restore the OpenEMR database backup to the MySQL database 'openemr_it'.
The OpenEMR database user will be 'openemr' with password 'G64WiuKPLE5h'.
MySQL will use character set 'utf8' with collation 'utf8_general_ci'.
Please check the above very carefully!
Any existing databases and directories matching these names will be DESTROYED.
Do you wish to continue? [N/y] y
In order to create MySQL databases and users on this computer, I will need to
log into MySQL as its 'root' user. The next question asks for the MySQL root
user's password for this server, the one that you are restoring to. This is
a MySQL password, not a system login password. It might be blank.
Enter the password, if any, for the MySQL root user: XXXXX
Dropping old OpenEMR database if it exists ...
Database "openemr_it" dropped
Restoring OpenEMR database ...
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
Restoring site subdirectory ...
All done.
robert@robert-VirtualBox:~$
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Script output indicates that /var/www/openemr already exists and so is not being overwritten. Perhaps you are restoring an older release? Try renaming the existing directory to openemr.old and then re-run the restore. If you are upgrading that needs to happen after the restore.
Also, by the way, never trust your backup process until you have successfully tested the corresponding restore.
Yes, that worked thank you. I didn’t think I had backed up from an older version of OpenEMR, but I’m not in a position to check that right now. The reason there was already a www/openemr directory is that in the past a situation arose (the details of which to be honest I can’t remember) where I thought that I needed two sites, named ‘default’ and ‘italy’, for two different databases. What I have been trying to do now is to use a backup file and the restore script to transfer my databases from one computer to another. ‘default’ worked, ‘italy’ didn’t. However, as you suggested, I renamed the original openemr directory and created a new one. I then restored ‘italy’ to the new directory, and copied over ‘default’. Now both work. Thank you very much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately, this same problem has recurred in a different context. First let me answer Rod's question: "Perhaps you are restoring an older release?" No, the versions of OpenEMR on which the backup was made and restored to were the same: 4.1.2.
Error:Table'openemr_it.log_comment_encrypt'doesn'texist/var/www/openemr/library/log.incat49:sqlInsertClean_audit/var/www/openemr/library/authentication/login_operations.phpat116:newEvent(login,admin,Default,1,success:127.0.0.1)/var/www/openemr/library/auth.incat50:validate_user_password(admin,,Default)/var/www/openemr/interface/globals.php at 352:include_once(/var/www/openemr/library/auth.inc)/var/www/openemr/interface/main/main_screen.php at 25:require_once(/var/www/openemr/interface/globals.php)
This time if I try Rod's strategy of renaming the existing directory to openemr.old and then running restore, I can log in to both sites again, but then I see that the version of OpenEMR has reverted to 4.1.2.
Any further ideas what to do?
Many thanks.
Last edit: Robert Hale 2016-07-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure what exactly you did, but sounds like your "italy" database has not yet been upgraded to the new release. Try going to http://localhost/openemr/admin.php?site=italy and it will probalby give you a link for the database upgrade.
When the upgrade completes, be sure to scroll through the listing of messages to check for any errors (which would be in red).
I simply downloaded the 4.2.2 deb package and installed in the normal way - it installed over the previous version, apparently without errors.
When I go to http://localhost/openemr/admin.php?site=italy I can see both "italy" and "default". "italy" is listed as being version 4.1.2 (7), while "default" is 4.2.1 (7). Clicking the "Upgrade Database" link for either takes me to a blank page where there is no evidence of anything happening! The address of the "italy" upgrade database page is: http://localhost/openemr/sql_upgrade.php?site=italy. Even if I wait and wait, nothing happens there...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A blank sql_upgrade.php page is definitely a problem and would make it hard to upgrade the database! Check your Apache error log to find out why it crashed.
following command should allow it to be run:
sudo chmod 666 /var/www/openemr/sql_upgrade.php
Sound like an error happened in the upgrade. There are 2 files (1 in /etc/openemr/ and 1 in /var/log/openemr/ ) that can be used to debug. Feel free to paste the output of them here.
-brady
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<p><p><fontcolor='red'>ERROR:</font> query failed: UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_influenza_ge_50_cqm' AND `pid` = 0<p>Error: <fontcolor='red'>Unknown column 'cqm_2014_flag' in 'field list'</font><p><br>/var/www/openemr/library/sql_upgrade_fx.php at 546:sqlStatement<br>/var/www/openemr/TEMPsql_upgrade.php at 56:upgradeFromSqlFile(4_2_1-to-4_2_2_upgrade.sql)SQL Error with statement:query failed: UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_influenza_ge_50_cqm' AND `pid` = 0--Unknown column 'cqm_2014_flag' in 'field list'==>/var/www/openemr/library/sql_upgrade_fx.php at 546:sqlStatement
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have version 4.2.1 installed on Lubuntu 15.10. I have beeen trying to restore a backup, but get the following error.
ERROR: insert failed: INSERT INTO log_comment_encrypt (log_id, encrypt, checksum) VALUES ( '35106','No','')
Error: Table 'openemr_it.log_comment_encrypt' doesn't exist
/var/www/openemr/library/log.inc at 49:sqlInsertClean_audit
/var/www/openemr/library/authentication/login_operations.php at 116:newEvent(login,admin,Default,1,success: 127.0.0.1)
/var/www/openemr/library/auth.inc at 50:validate_user_password(admin,,Default)
/var/www/openemr/interface/globals.php at 352:include_once(/var/www/openemr/library/auth.inc)
/var/www/openemr/interface/main/main_screen.php at 25:require_once(/var/www/openemr/interface/globals.php)
Is this recuperable?
Thank you.
Hello Robert,
Please try backup and restore process again.
And share the steps how you are restoring the database.
Thanks,
Wepp Team
Hi, thanks for your reply. I used the restore script. Please see terminal output below. I forgot to say that the above error is shown once I try to log in to OpenEMR in my browser.
I'm getting a little nervous here now. Is there anyone who knows something which may help me restore my backup? Many thanks.
Script output indicates that /var/www/openemr already exists and so is not being overwritten. Perhaps you are restoring an older release? Try renaming the existing directory to openemr.old and then re-run the restore. If you are upgrading that needs to happen after the restore.
Also, by the way, never trust your backup process until you have successfully tested the corresponding restore.
Rod
http://www.sunsetsystems.com/
Last edit: Rod Roark 2016-06-23
Yes, that worked thank you. I didn’t think I had backed up from an older version of OpenEMR, but I’m not in a position to check that right now. The reason there was already a www/openemr directory is that in the past a situation arose (the details of which to be honest I can’t remember) where I thought that I needed two sites, named ‘default’ and ‘italy’, for two different databases. What I have been trying to do now is to use a backup file and the restore script to transfer my databases from one computer to another. ‘default’ worked, ‘italy’ didn’t. However, as you suggested, I renamed the original openemr directory and created a new one. I then restored ‘italy’ to the new directory, and copied over ‘default’. Now both work. Thank you very much.
You're welcome, good to hear you are up and running.
Rod
http://www.sunsetsystems.com/
Unfortunately, this same problem has recurred in a different context. First let me answer Rod's question: "Perhaps you are restoring an older release?" No, the versions of OpenEMR on which the backup was made and restored to were the same: 4.1.2.
The new context is the following. I have upgraded the software on which the backup was made to 4.2.2. Before the upgrade I could log in to both http://localhost/openemr/interface/main/main_screen.php?auth=login&site=default and http://localhost/openemr/interface/main/main_screen.php?auth=login&site=italy . After the upgrade, I can log in to "default", but when I try to log in to "italy", I get the same error as before:
ERROR: insert failed: INSERT INTO log_comment_encrypt (log_id, encrypt, checksum) VALUES ( '35106','No','')
This time if I try Rod's strategy of renaming the existing directory to openemr.old and then running restore, I can log in to both sites again, but then I see that the version of OpenEMR has reverted to 4.1.2.
Any further ideas what to do?
Many thanks.
Last edit: Robert Hale 2016-07-11
Any thoughts?
Not sure what exactly you did, but sounds like your "italy" database has not yet been upgraded to the new release. Try going to http://localhost/openemr/admin.php?site=italy and it will probalby give you a link for the database upgrade.
When the upgrade completes, be sure to scroll through the listing of messages to check for any errors (which would be in red).
Rod
http://www.sunsetsystems.com/
I simply downloaded the 4.2.2 deb package and installed in the normal way - it installed over the previous version, apparently without errors.
When I go to http://localhost/openemr/admin.php?site=italy I can see both "italy" and "default". "italy" is listed as being version 4.1.2 (7), while "default" is 4.2.1 (7). Clicking the "Upgrade Database" link for either takes me to a blank page where there is no evidence of anything happening! The address of the "italy" upgrade database page is: http://localhost/openemr/sql_upgrade.php?site=italy. Even if I wait and wait, nothing happens there...
A blank sql_upgrade.php page is definitely a problem and would make it hard to upgrade the database! Check your Apache error log to find out why it crashed.
Rod
http://www.sunsetsystems.com/
Hi,
deb package "secures" that script:
https://github.com/openemr/openemr/blob/master/contrib/util/ubuntu_package_scripts/production/postinst#L544-L550
following command should allow it to be run:
sudo chmod 666 /var/www/openemr/sql_upgrade.php
Sound like an error happened in the upgrade. There are 2 files (1 in /etc/openemr/ and 1 in /var/log/openemr/ ) that can be used to debug. Feel free to paste the output of them here.
-brady
The plot thickens...
I used the following command: sudo chmod 666 /var/www/openemr/sql_upgrade.php
That allowed "default" to upgrade (at least I am assuming it did, see note below), but not "italy". The latter gave:
Note: The assumed successful upgrade of "default" gives an output that leaves one somewhat hanging in the air...
I am attaching /etc/openemr/openemr.conf and /var/log/openemr/install
Hi,
Do in browser:
The deb package should of upgraded both of these. Definitely interested to see what is in the debug files listed above.
-brady
OpenEMR
The upgrade script errored out here:
Super weird, because that sql query worked in your upgrade script above:
btw,
I didn't mention it, but the default upgrade you did looks good.
-brady
Sorry to be dense, but what do you mean by "<browser_address>" in "<browser_address>sql_upgrade.php?site=italy".
Thanks.
for example:
http://localhost/openemr/sql_upgrade.php?site=italy
Got it. Yes, that allowed the upgrade to proceed and I can now log into "italy" successfully. Thank you very much Brady and Rod for your help.