<?php if(!defined('PRIVATE_DIR'))define('PRIVATE_DIR','/var/www/private'); if(!defined('SHARED_DIR'))define('SHARED_DIR',__DIR__); require_once __DIR__ . '/credentials.php'; $_db_cfg = CredentialStore::get('db') ?: []; defined('DB_HOST')||define('DB_HOST',$_db_cfg['host']??'127.0.0.1'); defined('DB_PORT')||define('DB_PORT',(int)($_db_cfg['port']??3306)); defined('DB_NAME')||define('DB_NAME',$_db_cfg['name']??'store'); defined('DB_USER')||define('DB_USER',$_db_cfg['user']??''); defined('DB_PASS')||define('DB_PASS',$_db_cfg['pass']??''); unset($_db_cfg); $_pii_key = CredentialStore::get('pii_key'); if ($_pii_key && strlen($_pii_key) === 64 && ctype_xdigit($_pii_key)) { defined('ENCRYPTION_KEY') || define('ENCRYPTION_KEY', $_pii_key); } $_app_env = CredentialStore::get('app_env'); if ($_app_env) { defined('APP_ENV') || define('APP_ENV', $_app_env); } defined('ENCRYPTION_KEY') || define('ENCRYPTION_KEY', ''); defined('APP_ENV') || define('APP_ENV', 'production'); date_default_timezone_set('America/Toronto'); 