Multi Site Installation freezes

Situation
I’m trying to add another site and using the Multi Site Module. My installation freezes at Step 3. I tried to run setup.php again after changing sqlconf.php for the add-on site, but same thing again. Attached is a screenshot.

OpenEMR Version
I’m using OpenEMR version v5.0.2 (1)

Browser:
I’m using: Firefox

Operating System
I’m using: Ubuntu 18.04

Logs
Don’t see anything in var/log/openemr/install.

Hello Venu
Could you please share the apache error log here- so that it will be useful to find the root cause.

The default apache error log location will be ‘/var/log/apache/’

Thank You
ViSolve-002

Hi @visolve-002,

Here are some lines from the apache error log (I’ve deleted many that seemed to be just repeating):

[Sun Dec 15 21:22:34.211428 2019] [php7:notice] [pid 17716] [client 73.166.198.168:38616] PHP Notice: Undefined index: language_direction in /var/www/openemr/src/Core/Header.php on line 149

[Sun Dec 15 21:22:34.863713 2019] [php7:notice] [pid 17716] [client 73.166.198.168:38616] PHP Notice: Undefined index: authUser in /var/www/openemr/library/auth.inc on line 79, referer: https://****/openemr/public/themes/style_light.css?v=49

[Sun Dec 15 21:23:42.989472 2019] [php7:notice] [pid 18401] [client 73.166.198.168:38670] PHP Notice: Undefined variable: forwardIp in /var/www/openemr/library/sanitize.inc.php on line 31, referer: https://****/openemr/interface/login/login.php?site=bluebird

[Sun Dec 15 21:26:04.274702 2019] [php7:notice] [pid 18402] [client 73.166.198.168:38718] PHP Notice: Undefined variable: forwardIp in /var/www/openemr/library/sanitize.inc.php on line 31, referer: https://****/openemr/interface/login/login.php?site=default

[Sun Dec 15 21:26:04.759218 2019] [php7:notice] [pid 18402] [client 73.166.198.168:38718] PHP Notice: Only variables should be passed by reference in /var/www/openemr/src/Menu/MainMenuRole.php on line 67, referer: https://****/openemr/interface/login/login.php?site=default

[Sun Dec 15 21:26:06.616547 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Constant REPEAT_EVERY_DAY already defined in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 54, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.616589 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Constant REPEAT_EVERY_WEEK already defined in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 55, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.616597 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Constant REPEAT_EVERY_MONTH already defined in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 56, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.616622 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Constant REPEAT_EVERY_YEAR already defined in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 57, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.616630 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Constant REPEAT_EVERY_WORK_DAY already defined in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 58, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.684785 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined index: lastcaldate in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 194, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.685562 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Only variable references should be returned by reference in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 228, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.686517 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined variable: faFlag in /var/www/openemr/interface/main/calendar/modules/PostCalendar/pnuserapi.php on line 1192, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.686553 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined variable: collideFlag in /var/www/openemr/interface/main/calendar/modules/PostCalendar/pnuserapi.php on line 1195, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.686560 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined variable: listappsFlag in /var/www/openemr/interface/main/calendar/modules/PostCalendar/pnuserapi.php on line 1198, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.686569 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined variable: providerID in /var/www/openemr/interface/main/calendar/modules/PostCalendar/pnuserapi.php on line 1206, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.687205 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined variable: pc_facility in /var/www/openemr/interface/main/calendar/modules/PostCalendar/pnuserapi.php on line 899, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.703773 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined index: topics in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 153, referer:

[Sun Dec 15 21:26:06.704826 2019] [php7:warn] [pid 17680] [client 73.166.198.168:38720] PHP Warning: A non-numeric value encountered in /var/www/openemr/library/patient.inc on line 1499, referer: https:/

/****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.704864 2019] [php7:warn] [pid 17680] [client 73.166.198.168:38720] PHP Warning: A non-numeric value encountered in /var/www/openemr/library/patient.inc on line 1501, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.706242 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Only variable references should be returned by reference in /var/www/openemr/interface/main/calendar/

modules/PostCalendar/common.api.php on line 146, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:06.708267 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Only variable references should be returned by reference in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 168, referer: https://****/openemr/interface/main/main_info.php

[Sun Dec 15 21:26:09.760437 2019] [php7:notice] [pid 17680] [client 73.166.198.168:38720] PHP Notice: Undefined index: topics in /var/www/openemr/interface/main/calendar/modules/PostCalendar/common.api.php on line 153, referer: https://****/openemr/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&pc_username=admin&framewidth=1544

[Sun Dec 15 21:26:09.834393 2019] [php7:warn] [pid 17680] [client 73.166.198.168:38720] PHP Warning: A non-numeric value encountered in /var/www/openemr/library/patient.inc on line 1499, referer: https:/

/****/openemr/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&pc_username=admin&framewidth=1544

[Sun Dec 15 21:26:09.834434 2019] [php7:warn] [pid 17680] [client 73.166.198.168:38720] PHP Warning: A non-numeric value encountered in /var/www/openemr/library/patient.inc on line 1501, referer: https://****/openemr/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&pc_username=admin&framewidth=1544

@vrjula
This apache log - doesn’t have enough details to debug the issue. It has only warnings.
If there is issue in creating the database - that should have caught in apache error log.

We tried to reproduce the same with latest openemr and we could not able to reproduce the scenario.

If you have any other specific details please post here - for the team here to help you promptly.

It could have happened because of your system resources usage also.

Thank You
ViSolve-002

Here are more specific details: I have followed the instructions on installation of the multi-site module. The first go-around, on step 1 I chose to have setup create database. I go to step 2, input all the details for mysql root access and usernames/passwords to set up the database and initial user. I get past step 2, then I see the screen you see above on the screenshot. It hangs on that last sub-step, adding initial user. I have to close out at that point. I saw that the database and site subfolder were created; I see tables set up in the database. I get the login screen for the new site, but when I try to log on with the new user information, it doesn’t accept it – so I’m assuming the new user was never actually created. Twice I have tried to rerun the installation, choosing that I have already created the database on step 1. Both times, I get past step 2 and then get the same freeze as above on the screenshot.

I haven’t yet tried to rerun the whole installation again and have setup create the database again. If I want to try to start completely over, is it sufficient to just delete the new mysql database and new site subfolder?

I’m not sure what you mean by system resources usage.

-Venu

hi @vrjula, there’s definitely something funny going on

what if you create the database and choose the appropriate option in the first step of setup and then use the mysql credentials that have the appopriate grants for that database (non-root), something like
grant all privileges on openemrsite2.* to openemr@localhost;
?

ps ignore create db and user when you’ve just selected “i have already created the database” on the previous page

Hi @stephenwaite, I’m not following you.

Below is the screenshot of the setup tool, after I’ve selected that I’ve already created the database on the screen before this:

Bluebird is the name of the new site. I have a mysql password for it, which I enter in the relevant place. Source site is default, and I don’t want to clone the source database so I don’t choose that. I change the initial user details, create a password, enter an initial group, and leave 2FA alone for now. Then I hit the Create DB and User button, the only button to take me to the next step. Which eventually gets me to the freeze above.

I’m ready to start all over by deleting the new database and newly created site subfolder, unless there’s a cleaner way to start all over.

-Venu

hi @vrjula, have you tested the bluebird mysql user access on the bluebird mysql database from a command line or other tool?

Yes, I can access the bluebird mysql database from the command line.

ok, then agree to delete the database and recreate it at the command line

Well…nothing’s worked. I dropped the database and recreated it, then tried again. Then I reset everything: dropped the database, dropped the user, deleted the site subfolder, and started all over with the setup tool creating the mysql user and database again (via mysql root access). No go. On Step 3 it says everything is OK, and then it just hangs on Adding Initial User… (see original snapshot above). It doesn’t go to Step 4. The page just freezes. I can’t even hit the ? and get the pop-up install instructions.

I don’t get it. Is there some error log that would provide a clue?

–Venu

hope so, first turn off notices in your apache php config, https://www.open-emr.org/wiki/index.php/FAQ#What_are_the_correct_PHP_settings_.28can_be_found_in_the_php.ini_file.29.3F, restart apache and try again

Ok, this seems quite promising…from the error log:

[Sun Dec 22 08:50:52.030187 2019] [php7:error] [pid 4179] [client 73.166.198.168:60980] PHP Fatal error: Uncaught Error: Call to undefined function oemr_password_salt() in /var/www/openemr/library/classes/Installer.class.php:360\nStack trace:\n#0 /var/www/openemr/setup.php(1089): Installer->add_initial_user()\n#1 {main}\n thrown in /var/www/openemr/library/classes/Installer.class.php on line 360, referer: https://*****************/openemr/setup.php

I think the oemr_password_salt password hashing function only allows for special characters . and /. I will try again…

UPDATE: So the use of special characters in the password wasn’t it. But my problem is clearly somewhere around here…

sorry, think it’s this fix Rel 502 by kylenave · Pull Request #3 · kylenave/openemr · GitHub

No sir. Same error:

[Sun Dec 22 10:07:36.673950 2019] [php7:error] [pid 4530] [client 73.166.198.168:33522] PHP Fatal error: Uncaught Error: Call to undefined function oemr_password_salt() in /var/www/openemr/library/classes/Installer.class.php:360\nStack trace:\n#0 /var/www/openemr/setup.php(1089): Installer->add_initial_user()\n#1 {main}\n thrown in /var/www/openemr/library/classes/Installer.class.php on line 360, referer: https://**************/openemr/setup.php

you edited the contrib/util/installScripts/InstallerAuto.php script?

Yes, and then reran the setup. That last error is after editing the InstallerAuto.php script. I did restart apache2, in case that mattered.

ok, looks like the error msg leads to the mysql user that you’re using can’t create another mysql user

So you’re saying don’t create another mysql user, just use my previous and existing mysql user access to create and access the new database? I seem to have no problem with creating the new mysql user. It’s creating the initial user for the EMR itself, where it seems to hang up.

Just want to make sure I understand you before I try again.

1 Like

yes, try using an existing mysql user with grant privileges