After upgrade over the weekend our email notification process stopped working. The error messages were due to:
Warning: include_once(…/…/interface/globals.php): failed to open stream: No such file or directory in /var/www/openemr/modules/sms_email_reminder/cron_email_notification.php on line 18
Not sure why but the only way to pick up globals.php was after changing to :
include_once(dirname(__FILE__) . “/…/…/interface/globals.php”);
Now the globals.php emits the following :
Session site ID has been set to ‘’
This causes require_once to fail as the site ID is not filed in.
The script error is fixed by changing the highlighted line in globals.php :
…
…
// Set the site ID if required. This must be done before any database
// access is attempted.
if (empty($_SESSION) || !empty($_GET)) {
if (!empty($_GET)) {
$tmp = $_GET;
}
else {
if (!$ignoreAuth) die(“Site ID is missing from session data!”); $tmp = (empty($_SERVER) ? “default” : $_SERVER );
if (!is_dir($GLOBALS . “/$tmp”)) $tmp = “default”;
}
A cron initiated job has no HTTP_HOST, so it should default to “default” site.
Hopefully some one will come up with a better solution to or fix the globals.php for future releases.