Situation
Hi everyone, I’m using OpenERM 5.0.2 on iPage hosting provider with PHP Version 7.3.2.
After install, when try to login, the site print the follow error: Site ID is missing from session data!.
I can’t even access the system startup, I only get to the login
To fix it try:
Try with many browser (Safari, Chrome, Firedox, Edge, IExplorer), cleaning browser history and cache, don’t work
Verify the session.save_path param on the php.ini, don’t work
Reinstall, don’t work.
OpenEMR Version
I’m using OpenEMR version 5.0.2
Browser:
I’m using: Chrome, Firefox, Iexplorer, Edge and Safari
Operating System
I’m using Windows, but the installation is on Webhosting on Ipage.com (PHP, MySQL)
I’m pretty sure that you need to have openemr as part of the link. That could be the issue. You will have to configure your server to have openemr as part of the URL.
I’ve been having this issue for a while in my Kubernetes/OpenShift setup. My container of course is read-only, so I’m not sure how to adjust this setting. I know I’ll have to fork the project for these custom edits, but I’m not clear on how to edit the globals.php so that “missing session ID” doesn’t come up anymore.
// 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)) {
// 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”;
require_once("$srcdir/auth.inc");
}
die(“Site ID is missing from session data!”);
}
I have it used OpenEMR before, many times in fact, but I’m using a new deployment method that Red Hat and its parent IBM cooked up last spring when COVID started. Basically, it’s a fast way to deploy OpenEMR as a Kubernetes resource. It works except for this session bug!
You can literally deploy an autoscaling instance of OpenEMR in less than three minutes. It’s terrific!
I wrote the instructions and contributed some bug fixes for my Master’s in Health Informatics thesis last spring.
Well, I took you advice from the Saturday Zoom session last spring, and I forked and edited the php.ini file so the session data, which is commented out in the upstream OpenEMR devops repo, saves to /tmp. Unfortunately, that doesn’t seem to help. Sorry it took so long for me to try this solution, but summer was very busy.
Yeah, the instructions have probably changed a bit since OpenShift 4 was released. I use Homebrew to obtain the latest oc client, I’m still running OpenShift 3.11, which is fine for my purposes, and Red Hat still updates it with the latest version of Docker, but not Kubernetes. I created my own single-node instance using these instructions: https://github.com/okd-community-install/installcentos Dead simple to do, too.
Another option is to get a free account at OpenShift.com, which you can use for testing.