Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Multi site install not displaying login screen after successful install

The installs are complete. When trying to access the new installs. The page is blank. No error messages in the log. The default site works fine.
login.php?site=org3 returns nothing. but login.php?site=default returns the login screen.
the server is the google cloud platform Ubuntu 18.04 PHP 7.4 MariaDB 5.x OEMR 6.0.0.

When I check the browser to see what is coming through. It is this.

 <html><head></head><body data-new-gr-c-s-check-loaded="14.991.0" data-gr-ext-installed=""></body></html>

Ideas, please.

Setting a die statement before the require global call. All three sites die and echo the die statement.
Move the die statement after the require and only the default site displays echo the die statement.


The globals file is failing at line 494.
I var_dump the $GLOBALS[‘OE_SITE_DIR’] and I got /openemr/html/openemr/sites/org2

Which is incorrect. It should be /openemr/sites/org2;

Now I need to figure out why it is incorrect data.

The code is more than likely not wrong. The install is on Google Cloud platform. When I do a ls -li /var/www what was returned was shocking.


In the global file, it is failing at line 122

// Set the site ID if required.  This must be done before any database
// access is attempted.
if (empty($_SESSION['site_id']) || !empty($_GET['site'])) {
if (!empty($_GET['site'])) {
    $tmp = $_GET['site'];
} else {
    if (empty($ignoreAuth) && empty($ignoreAuth_onsite_portal)) {
        // mdsupport - Don't die if logout menu link is called from expired session.
        // Eliminate this code when close method is available for session management.
        if ((isset($_GET['auth'])) && ($_GET['auth'] == "logout")) {
            $GLOBALS['login_screen'] = "login_screen.php";
            $srcdir = "../library";
        die("Site ID is missing from session data!");

    $tmp = $_SERVER['HTTP_HOST'];
    if (!is_dir($GLOBALS['OE_SITES_BASE'] . "/$tmp")) {
        $tmp = "default";

when I var_dump the $_SESSION[‘site_id’] the site two id is in the session variable org2. But if I dump $tmp it is empty. when i dump $_SERVER[‘HTTP_HOST’] it is empty also. dumping $GLOBALS[‘OE_SITES_BASE’] is empty on line138.

I have come to the conclusion that this feature cannot be used on Google Cloud because of the virtual paths that are being used.