5 * MACHINE-SPECIFIC CONFIGURATION SETTINGS
7 * The configuration settings in this file can be changed to suit the
8 * machine on which the app is running (ex. local, staging or production).
10 * This file should not be added to version control, rather a template
11 * file should be added instead and then copied for each install
13 * From phreeze package
14 * @license http://www.gnu.org/copyleft/lesser.html LGPL
20 if (isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite_two'])) {
21 $pid = $_SESSION['pid'];
23 GlobalConfig
::$PORTAL = true;
24 require_once(dirname(__FILE__
) . "/../../interface/globals.php");
27 GlobalConfig
::$PORTAL = false;
29 require_once(dirname(__FILE__
) . "/../../interface/globals.php");
30 if (! isset($_SESSION['authUserID'])) {
31 $landingpage = "index.php";
32 header('Location: '.$landingpage);
37 require_once 'verysimple/Phreeze/ConnectionSetting.php';
38 require_once("verysimple/HTTP/RequestUtil.php");
41 * database connection settings
43 GlobalConfig
::$CONNECTION_SETTING = new ConnectionSetting();
44 GlobalConfig
::$CONNECTION_SETTING->ConnectionString
= $GLOBALS['host'] . ":" . $GLOBALS['port'];
45 GlobalConfig
::$CONNECTION_SETTING->DBName
= $GLOBALS['dbase'];
46 GlobalConfig
::$CONNECTION_SETTING->Username
= $GLOBALS['login'];
47 GlobalConfig
::$CONNECTION_SETTING->Password
= $GLOBALS['pass'];
48 GlobalConfig
::$CONNECTION_SETTING->Type
= "MySQLi";
49 if (!$disable_utf8_flag) {
50 GlobalConfig
::$CONNECTION_SETTING->Charset
= "utf8";
53 GlobalConfig
::$CONNECTION_SETTING->Multibyte
= true;
54 // Turn off STRICT SQL
55 GlobalConfig
::$CONNECTION_SETTING->BootstrapSQL
= "SET sql_mode = '', time_zone = '" .
56 (new DateTime())->format("P") . "'";
59 * the root url of the application with trailing slash, for example http://localhost/patient/
60 * default is relative base address
62 if ($GLOBALS['portal_onsite_two_basepath']) {
63 GlobalConfig
::$ROOT_URL = RequestUtil
::GetServerRootUrl() . preg_replace('/^\//', '', $GLOBALS['web_root']) . '/portal/patient/';
65 GlobalConfig
::$ROOT_URL = $GLOBALS['web_root'] . '/portal/patient/';
72 // date_default_timezone_set("UTC");
74 // if Multibyte support is specified then we need to check if multibyte functions are available
75 // if you receive this error then either install multibyte extensions or set Multibyte to false
76 if (GlobalConfig
::$CONNECTION_SETTING->Multibyte
&& ! function_exists('mb_strlen')) {
77 die('<html>Multibyte extensions are not installed but Multibyte is set to true in _machine_config.php</html>');