From fb47514461dc6edaa0f95c0cff24a04c5db03211 Mon Sep 17 00:00:00 2001 From: Matt Fletcher Date: Sat, 27 Feb 2021 07:21:01 +0000 Subject: [PATCH] Update default DB name and revert to runtime constants --- admin/includes/configure.php | 28 ++++++++++++++-------------- includes/configure.php | 18 +++++++++--------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/admin/includes/configure.php b/admin/includes/configure.php index b3d359d77..395bf58fc 100644 --- a/admin/includes/configure.php +++ b/admin/includes/configure.php @@ -21,31 +21,31 @@ // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) - const HTTP_SERVER = ''; // eg, http://localhost or - https://localhost should not be NULL for production servers - const COOKIE_OPTIONS = [ + define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for production servers + define('COOKIE_OPTIONS', [ 'lifetime' => 0, 'domain' => '', 'path' => '', 'samesite' => 'Lax', - ]; + ]); define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesn't suit you, replace with your local path. (eg, /usr/local/apache/htdocs) - const DIR_WS_ADMIN = '/admin/'; - const DIR_FS_ADMIN = DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN; - const DIR_FS_BACKUP = DIR_FS_ADMIN . 'backups/'; + define('DIR_WS_ADMIN', '/admin/'); + define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); + define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // leave blank or omit to use MySQL sessions - const DIR_FS_SESSION = ''; + define('DIR_FS_SESSION', ''); - const HTTP_CATALOG_SERVER = ''; - const DIR_WS_CATALOG = '/catalog/'; - const DIR_FS_CATALOG = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG; + define('HTTP_CATALOG_SERVER', ''); + define('DIR_WS_CATALOG', '/catalog/'); + define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); // set default timezone if none exists (PHP 5.3 throws an E_WARNING) date_default_timezone_set(date_default_timezone_get()); // define our database connection - const DB_SERVER = ''; - const DB_SERVER_USERNAME = 'mysql'; - const DB_SERVER_PASSWORD = ''; - const DB_DATABASE = 'osCommerce'; + define('DB_SERVER', ''); + define('DB_SERVER_USERNAME', 'mysql'); + define('DB_SERVER_PASSWORD', ''); + define('DB_DATABASE', 'Phoenix'); diff --git a/includes/configure.php b/includes/configure.php index f38ff6065..11dd26d22 100644 --- a/includes/configure.php +++ b/includes/configure.php @@ -21,19 +21,19 @@ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) - const HTTP_SERVER = ''; // eg, http://localhost - should not be empty for productive servers - const COOKIE_OPTIONS = [ + define('HTTP_SERVER', ''); // eg, http://localhost - should not be empty for productive servers + define('COOKIE_OPTIONS', [ 'lifetime' => 0, 'domain' => '', 'path' => '', 'samesite' => 'Lax', - ]; - const DIR_WS_CATALOG = ''; + ]); + define('DIR_WS_CATALOG', ''); define('DIR_FS_CATALOG', dirname($_SERVER['SCRIPT_FILENAME']) . '/'); // leave blank or omit to use MySQL sessions - const DIR_FS_SESSION = ''; + define('DIR_FS_SESSION', ''); // set default timezone if none exists (PHP 5.3 throws an E_WARNING) date_default_timezone_set(date_default_timezone_get()); @@ -42,10 +42,10 @@ // please remove the data below before sharing // define our database connection - const DB_SERVER = ''; // eg, localhost - should not be empty for productive servers - const DB_SERVER_USERNAME = ''; - const DB_SERVER_PASSWORD = ''; - const DB_DATABASE = 'osCommerce'; + define('DB_SERVER', ''); // eg, localhost - should not be empty for production servers + define('DB_SERVER_USERNAME', ''); + define('DB_SERVER_PASSWORD', ''); + define('DB_DATABASE', 'Phoenix'); if (DB_SERVER == '' && is_dir('install')) { header('Location: install/index.php');