Cannot access newly installed OpenEMR at localhost/openemr


(Robert Hale) #1

Situation
I cannot access my newly installed OpenEMR via the browser at http://localhost/openemr/

I am told:

“This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500”

Note that this situation is subsequent to the situation described previously here: Broken mysql, cannot uninstall or ugrade openemr

Many thanks for your help.

OpenEMR Version
I’m using OpenEMR version 5.0.1-4

Browser:
I’m using: Chromium

Operating System
I’m using: Linux Mint 18.3

Logs
Did you check the logs? Yes. Was there anything pertinent in them? Yes…

‘’‘ERROR IN OPENEMR INSTALL: Unable to execute SQL: CREATE USER ‘openemr’@‘localhost’ IDENTIFIED BY ‘qNRVhg4X5P7r’ due to: Operation CREATE USER failed for ‘openemr’@‘localhost’
ERROR: unable to execute SQL: ‘CREATE USER ‘openemr’@‘localhost’ IDENTIFIED BY ‘qNRVhg4X5P7r’’ due to: Operation CREATE USER failed for ‘openemr’@‘localhost’ ‘’’


Broken mysql, cannot uninstall or ugrade openemr
(Stephen Nielson) #2

@rdh61 You mentioned on your other post that your friend reinstalled OpenEMR for you. From the error log you posted it doesn’t look like that install actually finished. Can you provide any more details on what specifically your friend did to ‘install’ OpenEMR? Was it just downloading the files onto the system? Was this a complete install from scratch without any new data? Or did your friend restore a backup of your old EMR?

The database error you posted is specifically stating that OpenEMR cannot access the database to create it’s default user. Have you checked your database configuration settings in your sites/default/sqlconf.php? You may need to manually create this user.

Based on your post I’m not sure that you are familiar with MySQL databases. You may need to come up to speed on how to do some simple basics with it or try to contact one of the professional vendors for support if you have to have this installed on Linux Mint. At this point I’d recommend you use the docker version of OpenEMR as it handles all the setup for you that or the amazon instance on a Lightsail configuration.

Be aware that this forum is a free community resource, you can contact the professional vendors for more immediate responses and comprehensive support. You have to weight the benefits of time versus money for what it is you are trying to achieve.


(Robert Hale) #3

@adunsulag Thank you for your help. This was an installation of the package ‘openemr-php7_5.0.1-4_all.deb’ via the package manager. The backup was not restored at the time but your reply prompted me to run sudo ./restore on my backup file. The result is that now I see the OpenEMR interface in my browser. However, when I attempt to log in, I am presented with the following:

Query Error

ERROR: insert failed: INSERT INTO log_comment_encrypt (log_id, encrypt, checksum, version) VALUES ( ‘74842’,‘No’,’’, ‘1’)

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

/var/www/openemr/library/log.inc at 55:sqlInsertClean_audit
/var/www/openemr/library/authentication/login_operations.php at 113:newEvent(login,admin,Default,1,success: ::1)
/var/www/openemr/library/auth.inc at 47:validate_user_password(admin,Default)
/var/www/openemr/interface/globals.php at 574: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) ‘’’

I should mention that the backup was made with an older version of OpenEMR, and I am guessing that is the problem. Am I right?

You are right that I am unfamiliar with MySQL databases. I have been using OpenEMR for several years, but I never had to do anything with MySQL directly before. I have searched for a professional to try to help me with this but am more or less reliably informed that where I live I am wasting my time. Therefore my next step would have been to reinstall my whole system from scratch, but this new development has given me some renewed hope.


(Stephen Nielson) #4

If possible you should try to restore the same version of OpenEMR that you had previously onto your upgraded operating system, if at all possible. At that point you will want to go through the steps of upgrading the OpenEMR system. https://www.open-emr.org/wiki/index.php/OpenEMR_Upgrade_Guides

The error you are running into is because the newer OpenEMR codebase has new database fields / columns that the older version did not.

In terms of contacting professional OpenEMR developers you’ve looked over this page? https://www.open-emr.org/wiki/index.php/Professional_Support

Most of us can work remotely so I’m not sure its a location thing as much as a pricing issue.


(Robert Hale) #5

Thank you. I have done what you suggested: uninstalled the latest version (5.0.1-4) and reinstalled the previous version (5.0.0-1). I then restored the back up. I can now log in and I see the user interface correctly. However, things are not quite working correctly. If I go to ‘Visit History’, I see my patient encounters, but if I click on one of them, I get a blank frame. Similarly, if I click on ‘Create Visit’, I get the New Encounter Form, but when I input my data and click ‘Save’, I again get a blank frame.


(Stephen Nielson) #6

Have you checked your log entries to see what errors you are getting?


(Robert Hale) #7

Sorry for the delay in getting back to you. In the meantime I had set off on a long and winding way, involving successive upgrades of OpenEMR and OS, with the help of another computer. I now have a working program, and believe I am moving towards a working latest version of OpenEMR on the latest version of my OS. Thank you for your help.


(Robert Hale) #8

My optimism has been short lived. I have got as far as version 5.0.0-2 (php 7), on a machine running Lubuntu 16.04 LTS. Trying to upgrade now to 5.0.1-1.

I get the message: “This package can not upgrade OpenEMR, because unable to confirm presence of a mysql credentials and/or database.”

The database is obviously there, because I can see all my patient and encounter data in OpenEMR. My openemr folder is in /var/www/

The openemr install log says:

lun abr 29 17:38:02 CEST 2019: For upgrade, confirmed that the mysql database (openemr) and mysql user (openemr) exist
lun abr 29 17:38:22 CEST 2019: MySQL 'openemr' database does not exist (or can't be accessed), unable to upgrade.
lun abr 29 17:38:22 CEST 2019: EXITING..........