If you are doing a new install, then need to get most recent download: http://www.open-emr.org/wiki/index.php/OpenEMR_Downloads
(although it does not say it, these installation packages use OpenEMR with patch 3 already installed since this bug broke installation)
Thanks Brady, for the input. I have already applied the patch but no luck. As I wrote earlier the same backup when restored on a 12.04 machine works flawlessly. It is only when I restore the same backup on a machine running Ubuntu 13.10 that this problem pops up.
By the way I still get the same error message after applying the patch:[Sun Apr 20 11:28:34.311807 2014][:error][pid 11725][client 127.0.0.1:48382] PHP Fatal error: Cannot redeclare password_hash() in /var/www/openemr/library/authentication/password_hashing.php on line 104, referer: http://localhost/openemr/interface/login/login.php
PS: Cannot get the sarcasm, this used to be a quiet friendly place when I was last here!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
which uses oemr_ as a prefix for the various functions.
This is not the only file that needs to be updated, but it's the easiest one to check.
Whatever you are doing with your backup/restore/patch process is not leaving you with the correct versions of the various files.
No matter how many different OS packages you try, you are still going to have the same problem if it uses PHP 5.5 and your OpenEMR files are not properly patched.
Stephen's suggestions of restoring your database to an already verified working copy of OpenEMR running on the OS of your choice seems like a good plan to me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just a little explanation about my use of openemr.
I have my main machine in my office with an Ubuntu 12.04 server running in virtualbox on a windows 7 host. This where all the work on openemr is done. I backup everyday at the end of my work.
I have a laptop for personal use on which I run Ubuntu. I restore backups made on my office machine once every week so I can go through my patient records while I am away from my office. I usually do not backup this machine.
This laptop is the cause of my grief. Before I used to run Ubuntu 12.04 but upgraded it for various reasons.
So should I upgrade my office server or downgrade my laptop?
Last edit: Riaz Chaudhry 2014-04-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This means you missed a step in the application of the patch. It's sounds like you are trying to do a lot of different things at the same time, so it's hard to know what exactly you did wrong though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems to me like the backup OP is using is from 4.1.1 and not 4.1.2, hence the database access message.
If that's the case, then this sequence of steps may not result in a working OpenEMR, as the 4.1.1 to 4.1.2 database upgrade scripts may still need to by applied as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Essentially half the task has been accomplished by the successful recovery of the var/www/openemr directory, so there is only the restore of the database.
What did the error log say when you got that database access error message?
Did you tweak Php or MySQL after installing the Ubuntu/Debian package?
Instead of using the restore script, are you able to copy and replace the var/lib/mysql/openemr directory manually?
If the manual copy and replace does not work, consider the following:
install Linux Mint 16 on a different partition, leaving Ubuntu for other applications.
install Brady's package.
restore the var/www/openemr directory.
manually copy and replace the var/lib/mysql/openemr directory.
apply patch 5.
The GDebi Package Installer does not run reliably each time. I wonder if that is not the case in Ubuntu as well. Pieces of Brady's package may have been missing causing the database recovery to fail.
Last edit: fsgl 2014-04-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
At least 12.04 will be supported until 2017, so one less thing to worry about.
Art, in the above cited thread, upgraded from Ubuntu 8.04/OpenEMR 4.1.1 successfully; therefore we know that the leap from 12.04 to 13.10/14.04 is more than feasible.
You have patients to care for. Of course, we understand.
After a respite, come back to the Forums and we can give it another whirl.
Last edit: fsgl 2014-04-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
Running Ubuntu 13.10 Gnome with Openemr 4.1.2. Get a blank page after login. The login screen displays normally. Any pointers?
Regards
Most important,
3. Follow installation instructions including PHP, MySQL and Apache changes unless you know how all these work.
Hmmmmmm.... did that.
There will be a clear indication of what call failed in your /var/log/apache2/error.log
Sorting through the warnings vs. the root cause will be needed, but the error will show up.
Coming up with: [Sat Apr 19 23:07:52.789478 2014] [:error] [pid 2411] [client 127.0.0.1:44699] PHP Fatal error: Cannot redeclare password_hash() in /var/www/openemr/library/authentication/password_hashing.php on line 104, referer: http://localhost/openemr/interface/login/login.php
However the same runs flawlessly on Ubuntu 12.04.
Hmmmmmm.... after finding the error, it may help to put words "password_hash 104" and look for earlier discussions.
Oh, you already did that!
To clarify,
This is fixed with most recent patch:
http://www.open-emr.org/wiki/index.php/OpenEMR_Patches
If you are doing a new install, then need to get most recent download:
http://www.open-emr.org/wiki/index.php/OpenEMR_Downloads
(although it does not say it, these installation packages use OpenEMR with patch 3 already installed since this bug broke installation)
-brady
OpenEMR
Thanks Brady, for the input. I have already applied the patch but no luck. As I wrote earlier the same backup when restored on a 12.04 machine works flawlessly. It is only when I restore the same backup on a machine running Ubuntu 13.10 that this problem pops up.
By the way I still get the same error message after applying the patch:[Sun Apr 20 11:28:34.311807 2014] [:error] [pid 11725] [client 127.0.0.1:48382] PHP Fatal error: Cannot redeclare password_hash() in /var/www/openemr/library/authentication/password_hashing.php on line 104, referer: http://localhost/openemr/interface/login/login.php
PS: Cannot get the sarcasm, this used to be a quiet friendly place when I was last here!
Ubuntu 13.10 uses PHP 5.5 and has the conflicting function name for password_hash() as a built-in. 12.04 runs PHP 5.4 hence the difference.
I suspect that whatever mechanism you are using to restore your backup is overwriting the patched files.
Thanks Kevin, I am using the inbuilt backup and restore script for Ubuntu. I've patched the restored backup as well but with the same result.
I've been working at it on my own for quite some time now, and after getting nowhere put up the problem for the experts here.
I have upgraded to ubuntu 14.04 with no luck, have played around with Linuxmint as well with the same results.
However downloading a fresh openemr tarball results in a working emr though without my database.
This backup that I am restoring is made on my work machine where I run Ubuntu 12.04.
Now that you have a working fresh install Would using MySQL dump and restore get you to the promised land?
The key issue is that OpenEMR running with PHP 5.5 must have this version of the file
library/authentication/password_hashing.php:
https://github.com/openemr/openemr/blob/master/library/authentication/password_hashing.php
which uses oemr_ as a prefix for the various functions.
This is not the only file that needs to be updated, but it's the easiest one to check.
Whatever you are doing with your backup/restore/patch process is not leaving you with the correct versions of the various files.
No matter how many different OS packages you try, you are still going to have the same problem if it uses PHP 5.5 and your OpenEMR files are not properly patched.
Stephen's suggestions of restoring your database to an already verified working copy of OpenEMR running on the OS of your choice seems like a good plan to me.
Thanks all for the input.
Just a little explanation about my use of openemr.
I have my main machine in my office with an Ubuntu 12.04 server running in virtualbox on a windows 7 host. This where all the work on openemr is done. I backup everyday at the end of my work.
I have a laptop for personal use on which I run Ubuntu. I restore backups made on my office machine once every week so I can go through my patient records while I am away from my office. I usually do not backup this machine.
This laptop is the cause of my grief. Before I used to run Ubuntu 12.04 but upgraded it for various reasons.
So should I upgrade my office server or downgrade my laptop?
Last edit: Riaz Chaudhry 2014-04-20
Which version of Ubuntu is presently on the laptop? 13.10 or 14.04 LTS?
Were you able to apply Patch 5?
Difficult to determine which way to go regarding Ubuntu versions. First need to know what happened on the laptop and the database restore as well.
Here's the thread about the PHP incompatibility. A related thread about upgrading.
Applying patch 5 results in error: Failure during database access! Check server error log.
This means you missed a step in the application of the patch. It's sounds like you are trying to do a lot of different things at the same time, so it's hard to know what exactly you did wrong though.
Assuming the laptop is running Ubuntu 13.10, try the following:
It seems to me like the backup OP is using is from 4.1.1 and not 4.1.2, hence the database access message.
If that's the case, then this sequence of steps may not result in a working OpenEMR, as the 4.1.1 to 4.1.2 database upgrade scripts may still need to by applied as well.
Riaz will have to tell us if the desktop is on 4.1.1 or 4.1.2.
Will adjust my last post accordingly after we know.
@ fsgl, thanks for the input. I have followed the exact sequence as you pointed out.
Kevin, thanks for the input. Both desktop and laptop run the same version.
I am running 4.1.2
Regards
Essentially half the task has been accomplished by the successful recovery of the var/www/openemr directory, so there is only the restore of the database.
What did the error log say when you got that database access error message?
Did you tweak Php or MySQL after installing the Ubuntu/Debian package?
Instead of using the restore script, are you able to copy and replace the var/lib/mysql/openemr directory manually?
If the manual copy and replace does not work, consider the following:
The GDebi Package Installer does not run reliably each time. I wonder if that is not the case in Ubuntu as well. Pieces of Brady's package may have been missing causing the database recovery to fail.
Last edit: fsgl 2014-04-22
Step 4 is causing me grief. Cannot seem to extract it from my emr backup.
What patch is the desktop on? If the desktop is already running Patch 5, I would think patching is unnecessary.
Let's get back to the Ubuntu/Debian package running Ubuntu 13.10 first, before the attempt with Linux Mint 16. I'm getting ahead of myself.
With Brady's package and running Ubuntu 13.10 on the laptop, try:
a. copy the desktop var/lib/mysql/openemr directory manually to external medium.
b. manually copy and replace the same directory in the laptop.
As noted in the link cited above, there seems to be an additional problem with the built-in backup utility and restore process when upgrading.
Nothing seems to be working.
Have installed an Ubuntu 12.04 server on Virtualbox!
Sorry to hear that the problem has defeated us all.
Harley Tuck had a similar experience on his VirtualBox.
At least 12.04 will be supported until 2017, so one less thing to worry about.
Art, in the above cited thread, upgraded from Ubuntu 8.04/OpenEMR 4.1.1 successfully; therefore we know that the leap from 12.04 to 13.10/14.04 is more than feasible.
You have patients to care for. Of course, we understand.
After a respite, come back to the Forums and we can give it another whirl.
Last edit: fsgl 2014-04-24