I thought this would be a good write up for life experience with upgrading from v3.2.0. The problem that I have come upon is the conversion of the user accounts. Once the upgrade was completed, no one could log in.
- Installed a fresh copy of v7.
- Exported v3.2.0 database and imported it into the v7 created database.
- Ran the upgrade script and fixed errors like codes column missing from layout_options. easy stuff.
After the upgrade displayed completed, I tried to log in with one of the previous accounts from v3. No access granted. Also the system did not attempt to try and upgrade the credentials like it did when upgrading from v3 - v4.2.2.
I tried entering the credentials that were created when the clean copy was installed. Those credentials do not work now. I am working on how to get into the program after upgrading from v3.
One way to do it is to find a old copy of php, mysql, and apache for v4.2.2 and install it on a server. Then do the incremental upgrade from v3.2.0 - v4.2.2. This I have not tried but I theorize this would fix the login issue.
After a much digging, I read the error log and found this message.
[Wed Nov 23 11:28:49.971962 2022] [php:notice] [pid 10809] [client 70.169:55768] OpenEMR Error : Decryption failed authentication. [Wed Nov 23 11:28:49.971998 2022] [php:notice] [pid 10809] [client 70.169:55768] OpenEMR Error : Key in drive is not compatible (ie. can not be decrypted) with key in database - Exiting. [Wed Nov 23 11:29:43.895517 2022] [php:notice] [pid 10806] [client 70.169:55828] OpenEMR Error : Decryption is not working because of unknown encrypt/decrypt version.
I will state the obvious. Something is breaking the encryption. That is why the login is not working.
I figured out a way to do the upgrade that does not follow the normal convention but did eventually work for me.
In my opinion, there is no upgrade path for the users and user_secure tables. The users_secure table did not exist in v3.2. I did not find a way to leave the user table in place and run the upgrade script. What I ended up doing was to import all tables but the users table.
For the users table only, I exported it to CSV from the v3.2. I added all of the missing columns to the CSV so that I could import all the users into v7.x. Once I was able to import all of the users. Then I was able to set new passwords for the active users. The calendar came up and so far so good.
A new issue has arose. In the past, when upgrading from version 3 to v4.2.2. There was an upgrade script to convert the logins on the first time that the user logged in. If the user has forgotten their password. The admin cannot create a new login for them because the code looks for the user in the users_secure table in which they do not exist. So, admin cannot create a new password for that user.