10 * Copyright (c) 2003-2008 John Willinsky
11 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
15 * @brief Core system initialization code.
16 * This file is loaded before any others.
17 * Any system-wide imports or initialization code should be placed here.
20 // $Id: driver.inc.php,v 1.4 2009/09/22 19:22:10 asmecher Exp $
25 * Basic initialization (pre-classloading).
28 // Update include path
29 define('ENV_SEPARATOR', strtolower(substr(PHP_OS
, 0, 3)) == 'win' ?
';' : ':');
30 if (!defined('DIRECTORY_SEPARATOR')) {
31 // Older versions of PHP do not define this
32 define('DIRECTORY_SEPARATOR', strtolower(substr(PHP_OS
, 0, 3)) == 'win' ?
'\\' : '/');
34 define('BASE_SYS_DIR', dirname(dirname(__FILE__
)));
35 ini_set('include_path', '.'
36 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/includes'
37 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/classes'
38 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/pages'
39 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/lib/pkp/'
40 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/lib/pkp/classes'
41 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/lib/pkp/pages'
42 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/lib/pkp/lib/adodb'
43 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/lib/pkp/lib/phputf8'
44 . ENV_SEPARATOR
. BASE_SYS_DIR
. '/lib/pkp/lib/smarty'
45 . ENV_SEPARATOR
. ini_get('include_path')
48 // System-wide functions
49 require('functions.inc.php');
52 * System initialization (post-classloading).
55 import('core.PKPProfiler');
56 $pkpProfiler = new PKPProfiler();
58 import('core.OMPApplication');
59 $ompApplication = new OMPApplication();
60 PKPApplication
::initialize($ompApplication);