# Error Installing Version 5.0.2

**URL:** <https://community.open-emr.org/t/error-installing-version-5-0-2/12806>\
**Category:** Support\
**Tags:** installation\
**Created:** [September 10, 2019, 6:46am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806 "2019-09-10T06:46:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 10, 2019, 6:46am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/1 "2019-09-10T06:46:55Z")

</div>

**Situation**  
OpenEMR setup starts fine, I enter all the information needed into the form, but once I save the database information and continue, I get an error (posted below, in the Logs section). I have tried changing the query, but then other problems arise. Help needed. Thanks in advance.

**OpenEMR Version**  
I’m using OpenEMR version 5.0.2

**Browser** :  
I’m using: Google Chrome

**Operating System**  
I’m using: CPanel webhosting, Linux based, PHP 7.1, MySQL

**Logs**

```auto
ERROR. unable to execute SQL: 'CREATE TABLE `history_data` ( `id` bigint(20) NOT NULL auto_increment, `coffee` longtext, `tobacco` longtext, `alcohol` longtext, `sleep_patterns` longtext, `exercise_patterns` longtext, `seatbelt_use` longtext, `counseling` longtext, `hazardous_activities` longtext, `recreational_drugs` longtext, `last_breast_exam` varchar(255) default NULL, `last_mammogram` varchar(255) default NULL, `last_gynocological_exam` varchar(255) default NULL, `last_rectal_exam` varchar(255) default NULL, `last_prostate_exam` varchar(255) default NULL, `last_physical_exam` varchar(255) default NULL, `last_sigmoidoscopy_colonoscopy` varchar(255) default NULL, `last_ecg` varchar(255) default NULL, `last_cardiac_echo` varchar(255) default NULL, `last_retinal` varchar(255) default NULL, `last_fluvax` varchar(255) default NULL, `last_pneuvax` varchar(255) default NULL, `last_ldl` varchar(255) default NULL, `last_hemoglobin` varchar(255) default NULL, `last_psa` varchar(255) default NULL, `last_exam_results` varchar(255) default NULL, `history_mother` longtext, `dc_mother` text, `history_father` longtext, `dc_father` text, `history_siblings` longtext, `dc_siblings` text, `history_offspring` longtext, `dc_offspring` text, `history_spouse` longtext, `dc_spouse` text, `relatives_cancer` longtext, `relatives_tuberculosis` longtext, `relatives_diabetes` longtext, `relatives_high_blood_pressure` longtext, `relatives_heart_problems` longtext, `relatives_stroke` longtext, `relatives_epilepsy` longtext, `relatives_mental_illness` longtext, `relatives_suicide` longtext, `cataract_surgery` datetime default NULL, `tonsillectomy` datetime default NULL, `cholecystestomy` datetime default NULL, `heart_surgery` datetime default NULL, `hysterectomy` datetime default NULL, `hernia_repair` datetime default NULL, `hip_replacement` datetime default NULL, `knee_replacement` datetime default NULL, `appendectomy` datetime default NULL, `date` datetime default NULL, `pid` bigint(20) NOT NULL default '0', `name_1` varchar(255) default NULL, `value_1` varchar(255) default NULL, `name_2` varchar(255) default NULL, `value_2` varchar(255) default NULL, `additional_history` text, `exams` text, `usertext11` TEXT, `usertext12` varchar(255) NOT NULL DEFAULT '', `usertext13` varchar(255) NOT NULL DEFAULT '', `usertext14` varchar(255) NOT NULL DEFAULT '', `usertext15` varchar(255) NOT NULL DEFAULT '', `usertext16` varchar(255) NOT NULL DEFAULT '', `usertext17` varchar(255) NOT NULL DEFAULT '', `usertext18` varchar(255) NOT NULL DEFAULT '', `usertext19` varchar(255) NOT NULL DEFAULT '', `usertext20` varchar(255) NOT NULL DEFAULT '', `usertext21` varchar(255) NOT NULL DEFAULT '', `usertext22` varchar(255) NOT NULL DEFAULT '', `usertext23` varchar(255) NOT NULL DEFAULT '', `usertext24` varchar(255) NOT NULL DEFAULT '', `usertext25` varchar(255) NOT NULL DEFAULT '', `usertext26` varchar(255) NOT NULL DEFAULT '', `usertext27` varchar(255) NOT NULL DEFAULT '', `usertext28` varchar(255) NOT NULL DEFAULT '', `usertext29` varchar(255) NOT NULL DEFAULT '', `usertext30` varchar(255) NOT NULL DEFAULT '', `userdate11` date DEFAULT NULL, `userdate12` date DEFAULT NULL, `userdate13` date DEFAULT NULL, `userdate14` date DEFAULT NULL, `userdate15` date DEFAULT NULL, `userarea11` text, `userarea12` text, PRIMARY KEY (`id`), KEY `pid` (`pid`)) ENGINE=InnoDB AUTO_INCREMENT=1 ' due to: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
```

---

<div class="post-metadata">

**Author:** ![jesdynf](https://community.open-emr.org/user_avatar/community.open-emr.org/jesdynf/32/15698_2.png) [@jesdynf](https://community.open-emr.org/u/jesdynf)\
**Post date:** [September 10, 2019, 11:40pm UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/3 "2019-09-10T23:40:26Z")

</div>

That looks like the MariaDB rowsize error, doesn’t it?

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 11, 2019, 1:16am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/4 "2019-09-11T01:16:17Z")

</div>

oh yeah, like this [mariadb fix by bradymiller · Pull Request #2628 · openemr/openemr · GitHub](https://github.com/openemr/openemr/pull/2628#issue-308905640)

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 11, 2019, 8:12am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/5 "2019-09-11T08:12:59Z")

</div>

hi @konsyr11 ,  
Are you using mysql or mariadb? And what is the version of mysql/mariadb that you are using?  
-brady

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 14, 2019, 12:09pm UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/6 "2019-09-14T12:09:05Z")

</div>

Hello, first of all thank you so much for replying. I will keep the topic here and close my GitHub issue. @brady.miller from phpmyadmin database server details: 10.3.18-MariaDB - MariaDB Server  
Is there a particular fix/patch I can apply?

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 15, 2019, 8:30am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/7 "2019-09-15T08:30:51Z")

</div>

Hi @konsyr11 ,

The new versions of mariadb for 10.1/10.2/10.3 broke OpenEMR because of the following mariadb issue:  
"  
Prior to MariaDB 10.2.26, 10.3.17, and 10.4.7, MariaDB didn’t properly calculate the row sizes while executing DDL, so “unsafe” tables could be created, even with innodb\_strict\_mode=ON set. This was fixed by MDEV-19292. As a side effect, tables that could be created in previous versions may get rejected after the latest releases.  
"

We have fixed this and plan to release the patch and new packages in several days. If you can’t wait until then, let us know since there are other ways to get most recent version of 5.0.2 (note this won’t get the testing that the patches or new packages will be getting).

-brady

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 15, 2019, 8:45am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/8 "2019-09-15T08:45:18Z")

</div>

by the way, here’s the fix:

> <https://github.com/openemr/openemr/pull/2628#issue-308905640>

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 15, 2019, 9:06am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/9 "2019-09-15T09:06:37Z")

</div>

@brady.miller so I just need to get the files from “Files Changed” and replace the original ones with them?? And if not, I am interested in getting the patched beta. Nasty issue…  
This is my OpenEMR/sql directory:

 ![openemr-sql](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/b80e2c8701dba407f88565c8b4bd4764c8daddc7.png)  
Apart from replacing database.sql and 5\_0\_1-to-5\_0\_2\_upgrade.sql, do I need to do anything about 5\_0\_2-to-5\_0\_3\_upgrade.sql??

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 15, 2019, 9:14am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/10 "2019-09-15T09:14:07Z")

</div>

Hi @konsyr11 ,

Since this affects install(and don’t have a patch zip yet), you need a updated package. You can download a daily build for the rel-502 branch here, which is most recent 5.0.2 and is fixed (note would consider it beta sortish):  
[https://seven.openemr.io/e/files/openemr-cvs.tar.gz](https://seven.openemr.io/e/files/openemr-cvs.tar.gz)  
[https://seven.openemr.io/e/files/openemr-cvs.zip](https://seven.openemr.io/e/files/openemr-cvs.zip)

-brady

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 15, 2019, 2:26pm UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/11 "2019-09-15T14:26:56Z")

</div>

Great, will let you know if everything is correct. I will close the issue too.

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 15, 2019, 2:54pm UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/12 "2019-09-15T14:54:43Z")

</div>

@brady.miller same thing…  
`ERROR. unable to execute SQL: 'CREATE TABLE `history_data` ( `id` bigint(20) NOT NULL auto_increment, `coffee` longtext, `tobacco` longtext, `alcohol` longtext, `sleep_patterns` longtext, `exercise_patterns` longtext, `seatbelt_use` longtext, `counseling` longtext, `hazardous_activities` longtext, `recreational_drugs` longtext, `last_breast_exam` varchar(255) default NULL, `last_mammogram` varchar(255) default NULL, `last_gynocological_exam` varchar(255) default NULL, `last_rectal_exam` varchar(255) default NULL, `last_prostate_exam` varchar(255) default NULL, `last_physical_exam` varchar(255) default NULL, `last_sigmoidoscopy_colonoscopy` varchar(255) default NULL, `last_ecg` varchar(255) default NULL, `last_cardiac_echo` varchar(255) default NULL, `last_retinal` varchar(255) default NULL, `last_fluvax` varchar(255) default NULL, `last_pneuvax` varchar(255) default NULL, `last_ldl` varchar(255) default NULL, `last_hemoglobin` varchar(255) default NULL, `last_psa` varchar(255) default NULL, `last_exam_results` varchar(255) default NULL, `history_mother` longtext, `dc_mother` text, `history_father` longtext, `dc_father` text, `history_siblings` longtext, `dc_siblings` text, `history_offspring` longtext, `dc_offspring` text, `history_spouse` longtext, `dc_spouse` text, `relatives_cancer` longtext, `relatives_tuberculosis` longtext, `relatives_diabetes` longtext, `relatives_high_blood_pressure` longtext, `relatives_heart_problems` longtext, `relatives_stroke` longtext, `relatives_epilepsy` longtext, `relatives_mental_illness` longtext, `relatives_suicide` longtext, `cataract_surgery` datetime default NULL, `tonsillectomy` datetime default NULL, `cholecystestomy` datetime default NULL, `heart_surgery` datetime default NULL, `hysterectomy` datetime default NULL, `hernia_repair` datetime default NULL, `hip_replacement` datetime default NULL, `knee_replacement` datetime default NULL, `appendectomy` datetime default NULL, `date` datetime default NULL, `pid` bigint(20) NOT NULL default '0', `name_1` varchar(255) default NULL, `value_1` varchar(255) default NULL, `name_2` varchar(255) default NULL, `value_2` varchar(255) default NULL, `additional_history` text, `exams` text, `usertext11` TEXT, `usertext12` varchar(255) NOT NULL DEFAULT '', `usertext13` varchar(255) NOT NULL DEFAULT '', `usertext14` varchar(255) NOT NULL DEFAULT '', `usertext15` varchar(255) NOT NULL DEFAULT '', `usertext16` varchar(255) NOT NULL DEFAULT '', `usertext17` varchar(255) NOT NULL DEFAULT '', `usertext18` varchar(255) NOT NULL DEFAULT '', `usertext19` varchar(255) NOT NULL DEFAULT '', `usertext20` varchar(255) NOT NULL DEFAULT '', `usertext21` varchar(255) NOT NULL DEFAULT '', `usertext22` varchar(255) NOT NULL DEFAULT '', `usertext23` varchar(255) NOT NULL DEFAULT '', `usertext24` varchar(255) NOT NULL DEFAULT '', `usertext25` varchar(255) NOT NULL DEFAULT '', `usertext26` varchar(255) NOT NULL DEFAULT '', `usertext27` varchar(255) NOT NULL DEFAULT '', `usertext28` varchar(255) NOT NULL DEFAULT '', `usertext29` varchar(255) NOT NULL DEFAULT '', `usertext30` varchar(255) NOT NULL DEFAULT '', `userdate11` date DEFAULT NULL, `userdate12` date DEFAULT NULL, `userdate13` date DEFAULT NULL, `userdate14` date DEFAULT NULL, `userdate15` date DEFAULT NULL, `userarea11` text, `userarea12` text, PRIMARY KEY (`id`), KEY `pid` (`pid`)) ENGINE=InnoDB AUTO_INCREMENT=1 ' due to: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.`

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 15, 2019, 2:55pm UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/13 "2019-09-15T14:55:21Z")

</div>

something went wrong with the code quote, sorry for the flooding

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 15, 2019, 2:56pm UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/14 "2019-09-15T14:56:49Z")

</div>

Also, if it helps, the Installer manages to create **50** tables in the database

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 16, 2019, 2:45am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/15 "2019-09-16T02:45:01Z")

</div>

hi @konsyr11 ,  
That history\_data is a different table than what was breaking previously in mariadb 10.3.17, which is what was fixed (form\_eye\_neuro table). I’ll test 10.3.18 tonight and see if I can duplicate your error.  
-brady

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 16, 2019, 2:46am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/16 "2019-09-16T02:46:20Z")

</div>

Also,  
Are you creating the database before you run the install? If so, what encoding are you using?

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 16, 2019, 3:32am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/17 "2019-09-16T03:32:56Z")

</div>

The databases can only be created by my web host. I can check the encoding, but I am not sure I will be able to change it.

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 16, 2019, 3:40am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/18 "2019-09-16T03:40:44Z")

</div>

@brady.miller  
Server charset: UTF-8 Unicode (utf8)  
Server Connection Collation: utf8mb4\_unicode\_ci

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [September 16, 2019, 3:52am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/19 "2019-09-16T03:52:37Z")

</div>

hi @konsyr11 ,  
I tested to work ok on mariadb 10.3.18. You need to use utf8\_general\_ci collation when you create the database. The utf8mb4\_unicode\_ci will take up more space, which is why it breaks history\_data table. In the future, it would be good if somebody took the task to ensure mb4 support in OpenEMR, but I’m guessing that’s likely not gonna happen anytime soon.

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/5/5b59ff6d8f2a3783e2e4041e1fd332868e4a3ab4.png)

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 16, 2019, 3:59am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/20 "2019-09-16T03:59:47Z")

</div>

Will test it now, thank you.

---

<div class="post-metadata">

**Author:** ![konsyr11](https://community.open-emr.org/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@konsyr11](https://community.open-emr.org/u/konsyr11)\
**Post date:** [September 16, 2019, 4:07am UTC](https://community.open-emr.org/t/error-installing-version-5-0-2/12806/21 "2019-09-16T04:07:19Z")

</div>

@brady.miller I changed it, still same error…

[Next page](https://community.open-emr.org/t/error-installing-version-5-0-2/12806.md?page=2)
