Changeset 674 for trunk/bin/_config.inc.php
- Timestamp:
- May 2, 2019 10:17:26 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/_config.inc.php
r572 r674 39 39 define('CODEBASE_PATH', realpath(dirname(__FILE__) . '/../')); 40 40 41 42 41 $db_auth_file = false; 43 42 if (!defined('_NODB')) { … … 51 50 } 52 51 if (!$db_auth_file) { 53 die(sprintf("%s error: the current directory must be common site directory (i.e. the parent directory of the document root) AND a db_auth file must exist within two directory levels.\n", $cli_executed)); 52 printf("%s error: the current directory must be common site directory (i.e. the parent directory of the document root) AND a db_auth file must exist within two directory levels.\n", $cli_executed); 53 exit(1); 54 54 } 55 55 if (fileowner($db_auth_file) != getmyuid()) { 56 die(sprintf("%s error: you must execute this script as the owner of the web files.\n", $cli_executed)); 56 printf("%s error: you must execute this script as the owner of the web files.\n", $cli_executed); 57 exit(1); 57 58 } 58 59 } 59 60 60 61 // Set include path. 61 ini_set('include_path', get_include_path() . PATH_SEPARATOR . COMMON_BASE); 62 ini_set('include_path', join(PATH_SEPARATOR, array_unique(array( 63 '.', 64 COMMON_BASE, 65 dirname($db_auth_file) 66 )))); 62 67 63 68 /******************************************************************** … … 66 71 67 72 // Include core libraries. 68 require_once CODEBASE_PATH . '/lib/App.inc.php'; 69 require_once CODEBASE_PATH . '/lib/Utilities.inc.php'; 73 (include_once 'codebase/lib/App.inc.php') || require_once CODEBASE_PATH . '/lib/App.inc.php'; 70 74 71 75 define('_CLI', true);
Note: See TracChangeset
for help on using the changeset viewer.