Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Help with 6.0 upgrade

I upgraded the php to 7.3 and did the 6.0 emr upgrade and changed the config file in sites/default/sqlconfig.php to have the name of our test database TestEmr.

The logon screen comes up but I get this:

Query Error

ERROR: insert failed: INSERT INTO log_comment_encrypt (log_id, encrypt, checksum, checksum_api, version) VALUES (?, ?, ?, ?, ‘4’)

Error: Unknown column ‘checksum_api’ in ‘field list’

/home/evolvebh/public_html/temr/src/Common/Logging/EventAuditLogger.php at 811:sqlInsertClean_audit
/home/evolvebh/public_html/temr/src/Common/Logging/EventAuditLogger.php at 168:recordLogItem(1,login,EBH-admin-20,Default,006HGAF344PL4X1ZtABDjN9Mfrdpc15VAj3jF4n5VwwnP/g00UN8HVVr0zc1PRJsQcDNW1c/IPXePOLWZvxPFn5MPuH94mBq5XnwwtZ8/M8TjvjYodLmIPAQONSQz/yMHLy,login)
/home/evolvebh/public_html/temr/src/Common/Auth/AuthUtils.php at 410:newEvent(login,EBH-admin-20,Default,1,success: 172.77.106.191)
/home/evolvebh/public_html/temr/src/Common/Auth/AuthUtils.php at 114:confirmUserPassword(EBH-admin-20,)
/home/evolvebh/public_html/temr/library/auth.inc at 42:confirmPassword(EBH-admin-20,)
/home/evolvebh/public_html/temr/interface/globals.php at 577:require_once(/home/evolvebh/public_html/temr/library/auth.inc)
/home/evolvebh/public_html/temr/interface/main/main_screen.php at 19:require_once(/home/evolvebh/public_html/temr/interface/globals.php)

Run your sql_upgrade.php again from browser. Doesn’t appear the column was added. Maybe upgrade was interrupted.

o.k. I redid it and it completed 100%. Checking things and when I go to reports - billing report, I get this

Query Error

ERROR: query failed: INSERT INTO keys (name, value) VALUES (?, ?)

Error: Duplicate entry ‘sixa’ for key ‘name’

/home/evolvebh/public_html/temr/src/Common/Crypto/CryptoGen.php at 433:sqlStatementNoLog
/home/evolvebh/public_html/temr/src/Common/Crypto/CryptoGen.php at 231:collectCryptoKey(six,a,database)
/home/evolvebh/public_html/temr/src/Common/Crypto/CryptoGen.php at 100:coreDecrypt(byboRjUdDOtidfw+zM4KE/JU8svAHIZjOjon7mSM0tIT/ejHk586/j4fQOYeGtm5Sw1tf31osHUZvP0behIFUjnfmH7O+0VlKV9rvrxn5GGrk6X06wx6bPIbe0IQRmBqx0AUl1Mg8+4dzH3dTbRZvQ==,database,six)
/home/evolvebh/public_html/temr/src/Common/Crypto/CryptoGen.php at 462:decryptStandard(006byboRjUdDOtidfw+zM4KE/JU8svAHIZjOjon7mSM0tIT/ejHk586/j4fQOYeGtm5Sw1tf31osHUZvP0behIFUjnfmH7O+0VlKV9rvrxn5GGrk6X06wx6bPIbe0IQRmBqx0AUl1Mg8+4dzH3dTbRZvQ==,database)
/home/evolvebh/public_html/temr/src/Common/Crypto/CryptoGen.php at 153:collectCryptoKey(six,a,drive)
/home/evolvebh/public_html/temr/src/Common/Crypto/CryptoGen.php at 66:coreEncrypt(SHOW COLUMNS FROM x12_partners,drive,six)
/home/evolvebh/public_html/temr/src/Common/Logging/EventAuditLogger.php at 739:encryptStandard(SHOW COLUMNS FROM x12_partners)
/home/evolvebh/public_html/temr/src/Common/Logging/EventAuditLogger.php at 641:recordLogItem(1,security-administration-select,EBH-admin-20,Default,SHOW COLUMNS FROM x12_partners,Security)
/home/evolvebh/public_html/temr/library/ADODB_mysqli_log.php at 45:auditSQLEvent(SHOW COLUMNS FROM x12_partners,1,)
/home/evolvebh/public_html/temr/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php at 632:Execute(SHOW COLUMNS FROM x12_partners)
/home/evolvebh/public_html/temr/src/Common/ORDataObject/ORDataObject.php at 114:MetaColumns(x12_partners)
/home/evolvebh/public_html/temr/library/classes/X12Partner.class.php at 43:_load_enum(processing_format,)
/home/evolvebh/public_html/temr/interface/billing/billing_report.php at 109:__construct()

This has to do with the new encryption method. there are keys that are saved in this folder

and they have to match the keys in the database. Here is a thread that explains more in depth.

1 Like

Just before you go deleting anything make sure you save all these values in a safe space.

here is what the keys table looks like

and this is what the keys look like. (sixa)

its been hashed so if you follow the directions in the link above,make sure you copy all 4 values and remember where they go.

Thank you so much for the quick response.

I currently using 5.0.2 on Linux Mint, with PHP7.2.
Trying to upgrade to 6.0.0. , and getting problem with Php version.
Did upgrade PHP7.2 to 7.3., but when checking current version, it’s shoving 7.2 again.
Need help for PHP upgrade, to be able to upgrade to 6.0.0.