Multi-site setup: unable to move past Optional Site ID Selection

Hi all,

I’m trying to setup a multi-site installation using OpenEMR 7.0.0. My default site has already been fully configured and works fine.

I’ve followed the instructions and the proper settings have been applied to the setup.php file, but for some reason I can’t get past the “Optional Site ID Selection” page. After selecting ‘Continue’ I just see a blank page.

Should also note that when I first installed OpenEMR, there were no acl_setup.php or gacl/setup.php files anywhere. The multi-site instructions mention having the proper permissions in place for both files, so I’m wondering if their absence is the cause of this issue.

Any advice would be helpful, thanks!

Have you changed this line in the setup file?

Hi Sherwin. Yes, both the $allow_multisite_setup and $allow_cloning_setup values are set to ‘true’

Next question, have you checked your apache log to see if there are any errors?

Or you can put this at the top of the setup page so that it throws the errors on the screen.

 ini_set('display_errors', 1);
 ini_set('display_startup_errors', 1);
1 Like

Apache log shows the following error when I try to move beyond the Site ID Selection step:

[php:error] [pid 4968:tid 1764] [client] PHP Fatal error:  Uncaught Error: Call to undefined method OpenEMR\\Common\\Session\\SessionUtil::setupScriptSessionStart() in C:\\xampp\\htdocs\\openemr\\setup.php:298\nStack trace:\n#0 {main}\n  thrown in C:\\xampp\\htdocs\\openemr\\setup.php on line 298, referer: http://localhost/openemr/setup.php

I wonder if you inadvertently made an error when changing setup.php?

Consider replacing the file and editing it with notepad++, maybe?

What is in line 298? I don’t have that file.

Thanks for the suggestion. I normally use notepad ++

I tried replacing the setup.php file with the appropriate settings from my previous comment, but still experience the same issue.

Below is line 298 (right after “//set up new blank session and csrf mechanism”) from setup.php with previous lines for context:

// This will effectively only allow entry into the setup.php script at the first step and will bar entry to the
//  script if openemr has already been installed.
//  2 mechanisms are also in place to ensure go through script in chronological order
//   - a session variable tracks the next state expected and kills script is not correct
//   - only the next state csrf is handed out in the form
if (empty($state)) {
    // ensure not already installed
    if (!empty($config)) {
        error_log("OpenEMR has already been installed. If you wish to force re-installation, then edit " . errorLogEscape($installer->conffile) . " (change the 'config' variable to 0), and re-run the setup.php script.");
        die("OpenEMR has already been installed. If you wish to force re-installation, see log for details.<br />\n");
    // set up new blank session and csrf mechanism
    $_SESSION = [];
1 Like

It sounds like a bug. Try adding this line before line 298.

1 Like

After adding that line before line 298 I received this error when going to localhost/openemr/admin.php:

Fatal error: Uncaught mysqli_sql_exception: No connection could be made because the target machine actively refused it in C:\xampp\htdocs\openemr\admin.php:116 Stack trace: #0 C:\xampp\htdocs\openemr\admin.php(116): mysqli_connect('localhost', 'openemr', 'mypassword', 'openemr', '3306') #1 {main} thrown in C:\xampp\htdocs\openemr\admin.php on line 116

Im not sure its a bug. I just set up a test environment in a windows 11 laptop with xampp php8.1 (or 8.0) 4 days ago, using multisite. I was able to set up default and 2 more sites. Then I patched the install.

Is it possible you have a corrupted download? Did you do checksum verification?

1 Like

Wait, in my setup, i only modified the setup.php file by setting multisite to true. No other change

For 7.0 patch 1 make sure you grab the missing files for multi site from

I set $allow_cloning_setup to true so I can clone an existing database for the new site. I tried setting it back to false to see if that made any difference, but no luck.

And no, did not do checksum verification. I should have! At this point, wondering if I should reinstall and start fresh. Luckily this is a test environment.

1 Like

Thanks for that link Stephen. I found the acl_setup.php file in that repo, but no gacl/setup.php

However, when adding acl_setup.php to my openemr directory with the proper permissions, I receive the same error message from my Nov 23 comment (uncaught mysqli_sql_execution) when accessing localhost/openemr/admin.php

Thought I’d follow up on this again. Are there any other possible solutions, or would you recommend re-installing OpenEMR and trying again?


1 Like

hi @athenaortiz , would try patching to the just released patch 2 and try again

Thanks for sharing. Patch 2 resolved the issue. I’m now able to go through the installation steps.

However, after setting my MySQL and OpenEMR credentials, I’m getting a MySQL error.

I have the proper authentication settings in my file (below) and have no trouble using my root account to login to phpMyAdmin.

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Lang'] = '';

So turns out the MySQL credential error was because I didn’t enter my existing root password during the previous step (foolish mistake on my part). But now there’s another issue when trying to create the database and first user:

So I enabled permissions checking to see if that would give me more info and started the site setup again, only to get this message:

I find this strange because it doesn’t list any files and all the necessary directories have the proper permissions.

1 Like

it’s looking for an sqlconf.php inside the site directory and isn’t finding it

so can delete that site directory that exists and try again or use another site

There’s already a sqlconf.php in the default site directory.