Ugrade database 4.1.1 to 4.1.2

mdsupport wrote on Sunday, September 08, 2013:

In your current state turn on PHP error logging for warnings and errors. Then see if you get any messages that give some insight/clue.
Chances are program flow is terminating without html display due to some DB value but upgraded DB by itself is OK.

fsgl wrote on Monday, September 09, 2013:

Thanks for pitching in, Kevin and MDS.

Jack Cahn’s Momma said to forgive all.

Who am I to contradict une grande dame du Sud?

The other Jack, please get cracking.

jackfruit501 wrote on Tuesday, September 10, 2013:

Thanks Kevin.

I did the following and I think my knowledge of Mariadb is inadequate as I cannot get pass mysqldump!

$ sudo thunar
$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 5.5.32-MariaDB MariaDB Server

Copyright © 2000, 2013, Oracle, Monty Program Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| drupal |
| gaiaehr |
| mysql |
| openemr |
| openmrs |
| performance_schema |
| tomcat7 |
| wordpress |
±-------------------+
9 rows in set (0.10 sec)

MariaDB [(none)]> mysqldump -u root -p --databases openemr >/tmp/openemr.sql ->

I am stuck here.

Jackfruit501 (to avoid confusion)

yehster wrote on Tuesday, September 10, 2013:

inspect /tmp/openemr.sql at this point
How big is it?
Also try more /tmp/openemr.sql
Does it look “reasonable”?

However, I am a little confused though as you are reporting that you are doing the dump from the machine already running MariaDB. I thought your were trying to move from a machine with MySQL (Fedora 18) to MariaDB (Fedora19).

jackfruit501 wrote on Wednesday, September 11, 2013:

Hi Kevin,

I cannot find /tmp/openemr.sql.

I am using Fedora 19 with mariadb-5.5.32-8.fc19.i686. As reported in the earlier post I can upgrade openemr-4.1.1 database with openemr-4.1.2 but I cannot login to openemr proper even with the previous correct username and password or even the unchanged admin/pass (I did not change this in openemr-4.1.1 version). I hope this will put my initial report better.

Subsequently I removed both versions from /var/www/html/ (after backup by copy and paste to a different folder using root) and then using the mysql prompt to ‘drop’ openemr from the server database. I then did a fresh install with openemr-4.1.2 following the wiki instructions faithfully but at ‘localhost/openemr/sql_setup.php’ with Firefox browser the screen just remain stalled.

Jackfruit501

yehster wrote on Wednesday, September 11, 2013:

Which screen during setup did it stall on? Did it report partial progress and then stall? Any meaningful errors in your log?

jackfruit501 wrote on Thursday, September 12, 2013:

Hi Kevin,

With the upgraded openemr-4.1.2 I am stalled at
http://localhost/openemr/interface/main/main_screen.php?auth=login&site=default

I just get a blank screen with no error message.

Where do I get the error log?

Jackfruit501

fsgl wrote on Thursday, September 12, 2013:

Hi Jack,

Just realized what the stumbling block that has prevented you from getting to the root of the problem.

Never feel embarassed to ask simple questions. Only Brady and Kevin are OEO (Open EMR Omniscient). The rest of us continue to ask questions and learn so that we may get to that exalted state of enlightenment.

(Reminds me of a work experience as a teenager. The customer used the archaic form of a telephone exchange, saying “Barclay 7-5892”. Having a brain fade and forgetting that the second letter is “a”, I asked the customer to repeat the number, several times, hoping that he would say “227-5892”. He did not obligate and I was too embarassed to explain. The man was totally exasperated and told me in no uncertain terms what he thought of me.)

On my Windows 7 machine, I think that the error logs are in mysql\data\mysql_error.log and php\log\php_error_log. Kevin will tell you where to look.

I think we are on the right path now.

jackfruit501 wrote on Saturday, September 21, 2013:

Hi fsgl,

I followed the forum for developers on MariaDB 5.5 / Cent OS 6.4. I think installing Mariadb on ubuntu 13.04 and Fedora 19/Centos 6.4 is well covered in the links mentioned. I think Mariadb is not compatible with openemr-4.1.2 but not openemr-4.1.1 or early versions. Is the file sql_setup.php in openemr-4.1.2 radically different from the earlier versions?

Jackfruit501

fsgl wrote on Sunday, September 22, 2013:

Hi Jack,

After re-reading MedDev’s thread, I get the impression the MariaDB 5.5.32 is compatible with OpenEMR 4.1.2; otherwise he would not have been able to install them multiple times. Additionally that is also Kevin’s and Tony’s thought, although it was implied from Tony’s post. So MariaDB 5.5.32 is not the problem. I was making a wild guess in my earlier posts about the “incompatibility” of MariaDB because both Brady and Kevin were unavailable to help at the time.

I can attach the 4.1.2 sql_upgrade.php but that will only make things more confused.

The other thread talked about replacing MySQL with MariaDB and Kevin was also under the same impression in his 9/8/13 post. I know that MariaDB 5.5.32 is already in place. Let get back to the question as to what is causing the stall while upgrading.

Have you been able to find the error logs?

Working blind, I would guess that there are folders like a mariadb\data\mariadb_error.log and a php\log\php_error_log. I really don’t know what are the exact paths because I have a Windows machine. If you can find these two folders, what do they say?

The developers cannot offer solutions without knowing the problems. The error logs will give us the “diagnoses” or at least give us a sense where to look to get to the source of the problem.

jackfruit501 wrote on Monday, September 23, 2013:

Hi fsgl,
I found the logs at /var/log/httpd and mysql and I have attached them for your viewing and comments.

Jackfruit501

jackfruit501 wrote on Monday, September 23, 2013:

The following httpd errors are attached.

jackfruit501 wrote on Monday, September 23, 2013:

The following httpd errors are attached.

fsgl wrote on Monday, September 23, 2013:

Great!

Now we getting somewhere.

It’s hieroglyphics to me.

Hopefully one of the developers will come along and decipher them.

yehster wrote on Monday, September 23, 2013:

[Mon Sep 23 09:49:02.955734 2013] [:error] [pid 4068] [client 127.0.0.1:59357] PHP Fatal error: Cannot redeclare password_hash() in /var/www/html/openemr/library/authentication/password_hashing.php on line 104

This error is almost certainly the source of your problem why your system is trying to redeclare that function is a mystery though. Is there something you may have tweaked in the installation?

meddev wrote on Monday, September 23, 2013:

I would tend to think based on a quick review of this thread and in light of the fact that I’ve installed 4 sites with MariaDB that this is not related to MariaDB. I’m basically a newbie with OpenEMR but very experienced with mysql/mariaDB and software development. The openEMR code seems to be somehow corrupt since it is re declaring a function. This is something you would normally see during development but not a released package like OpenEMR 4.1.2. What I would do (sorry if you have already done this and I missed it) is to take a fresh copy of OpenEMR 4.1.2 and extract it into a separate directory than the one you are working with. Lets call them old_oemr and new_oemr for this example.

Then sitting at the directory level where both the old copy and the new copy is do a $ diff -R old_oemr new_oemr. That will show the code differences if any. Let us know what that gives you and it might help us a little more.

meddev wrote on Monday, September 23, 2013:

Also… just as a quick test I would disable selinux and try the install again. Just edit the file /etc/selinux/config and change SELINIX=enforcing to SELINUX=disabled. Reboot your server after the change and try the install again. I’ve seen so many weird problems coming from selinux that I disable it for testing when something odd happens.

meddev wrote on Monday, September 23, 2013:

yehster wrote on Monday, September 23, 2013:

It looks like PHP 5.5 introduces a function with the same name. Any chance you are using 5.5.x or newer (an untested platform…)

http://php.net/manual/en/function.password-hash.php

OpenEMR’s version of password_hash was introduced to keep compatibility with PHP 5.2 at the instance of Rod and Brady, despite 5.2 having been “end-of-lifed” for quite some time now.

Maintaining both forward compatibility and backward compatibility is not really a fun thing to deal with :frowning:

jackfruit501 wrote on Tuesday, September 24, 2013:

Hi Kevin,

You are right. I update Fedora 19 weekly and I now have php-5.5.3-1.fc19.i686.
I have not tweak anything during the installation. The only thing I did probably was to take ownership with this command :

sudo chown -Rv apache:apache /var/www/html/openemr/sites ( I needed this for another program)

Jackfruit501