# Error after running the sql\_upgrade script

**URL:** <https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886>\
**Category:** Support\
**Tags:** ehr\
**Created:** [June 20, 2017, 8:59pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886 "2017-06-20T20:59:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![growlingflea](https://forums.librehealth.io/user_avatar/forums.librehealth.io/growlingflea/32/847_2.png) [@growlingflea](https://forums.librehealth.io/u/growlingflea)\
**Post date:** [June 20, 2017, 8:59pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/1 "2017-06-20T20:59:47Z")

</div>

I download the newest master changes, ran the sql\_upgrade.sql script and now I am getting this screen

 ![](https://forums.librehealth.io/uploads/default/original/1X/8fc111b37c701b993355dbf7b65e42f7d79b3a13.png)

Here is my log file:

 ![](https://forums.librehealth.io/uploads/default/original/1X/a189acdab4423444140b0f296a95a2590d524d35.png)

Has anyone else run into this issue?

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:04pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/2 "2017-06-20T21:04:28Z")

</div>

I am not sure what is going on . The upgrade script should have just updated some fields in encounter forms.Did you download any of the PR’s ?

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:06pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/3 "2017-06-20T21:06:03Z")

</div>

Did you download the Role Based Menus code?

---

<div class="post-metadata">

**Author:** ![growlingflea](https://forums.librehealth.io/user_avatar/forums.librehealth.io/growlingflea/32/847_2.png) [@growlingflea](https://forums.librehealth.io/u/growlingflea)\
**Post date:** [June 20, 2017, 9:06pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/4 "2017-06-20T21:06:12Z")

</div>

I just pulled all the new changes from upstream master.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:14pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/5 "2017-06-20T21:14:05Z")

</div>

Comment out line 10 in interface\main\tabs\menu\menu\_data.php till I figure out what is going on

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:17pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/6 "2017-06-20T21:17:01Z")

</div>

Never mind Dan that won’t work.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:24pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/7 "2017-06-20T21:24:29Z")

</div>

Try running this /library/classes/installer.class.php see what happens

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:27pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/8 "2017-06-20T21:27:21Z")

</div>

You can’t run the above. Dan did you get any errors in the upgrade script when you ran it.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:27pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/9 "2017-06-20T21:27:48Z")

</div>

Try running the upgrade script again

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:35pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/10 "2017-06-20T21:35:23Z")

</div>

Dan do you have the menu\_data.json in the sites directory?

---

<div class="post-metadata">

**Author:** ![growlingflea](https://forums.librehealth.io/user_avatar/forums.librehealth.io/growlingflea/32/847_2.png) [@growlingflea](https://forums.librehealth.io/u/growlingflea)\
**Post date:** [June 20, 2017, 9:36pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/11 "2017-06-20T21:36:37Z")

</div>

Yup.

 ![](https://forums.librehealth.io/uploads/default/original/1X/f1abb8b33614431ae38653508dea7a83f4a48dec.png)

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:41pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/12 "2017-06-20T21:41:42Z")

</div>

Can you look at your old version of the code and see what is in menu\_data.php

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 9:43pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/13 "2017-06-20T21:43:22Z")

</div>

Do you have phpmyadmin installed?

---

<div class="post-metadata">

**Author:** ![growlingflea](https://forums.librehealth.io/user_avatar/forums.librehealth.io/growlingflea/32/847_2.png) [@growlingflea](https://forums.librehealth.io/u/growlingflea)\
**Post date:** [June 20, 2017, 9:44pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/14 "2017-06-20T21:44:06Z")

</div>

yes, I have phpmyadmin.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 10:30pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/15 "2017-06-20T22:30:34Z")

</div>

Did you check the permissions on the menu\_data.json file?

---

<div class="post-metadata">

**Author:** ![growlingflea](https://forums.librehealth.io/user_avatar/forums.librehealth.io/growlingflea/32/847_2.png) [@growlingflea](https://forums.librehealth.io/u/growlingflea)\
**Post date:** [June 20, 2017, 10:42pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/16 "2017-06-20T22:42:38Z")

</div>

yeah. Changed the mod to 777. I’m not sure what happened. Maybe I’ll try to reinstall it.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [June 20, 2017, 10:56pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/17 "2017-06-20T22:56:53Z")

</div>

Try it and let me know. The information does not appear to be saved in the globals file so I am not sure what is going on there. @tony made some of those changes maybe he can point us to something I am missing.

---

<div class="post-metadata">

**Author:** ![tony](https://forums.librehealth.io/user_avatar/forums.librehealth.io/tony/32/42_2.png) [@tony](https://forums.librehealth.io/u/tony)\
**Post date:** [June 27, 2017, 7:03pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/18 "2017-06-27T19:03:15Z")

</div>

I have no idea what the context of this discussion is… I removed the upgrade scripts entirely and Terry put them back (which is a reasonably stop-gap). Otherwise I know nuthin’. I have never needed (or wanted) to upgrade a libreHeatlh EHR, just new installs.

---

<div class="post-metadata">

**Author:** ![aethelwulffe](https://forums.librehealth.io/user_avatar/forums.librehealth.io/aethelwulffe/32/63_2.png) [@aethelwulffe](https://forums.librehealth.io/u/aethelwulffe)\
**Post date:** [June 27, 2017, 7:34pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/19 "2017-06-27T19:34:29Z")

</div>

…and my life has been a terror of constant diff upgrades that are never ever automated. Heh. Such is life.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [July 4, 2017, 9:11pm UTC](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886/20 "2017-07-04T21:11:38Z")

</div>

Did this get resolved with the re-installation of the code?

[Next page](https://forums.librehealth.io/t/error-after-running-the-sql-upgrade-script/886.md?page=2)
