1 --- nagvis-1.7-nightly/share/server/core/defines/global.php.orig 2012-12-16 11:56:58.912708241 +0100
2 +++ nagvis-1.7-nightly/share/server/core/defines/global.php 2012-12-16 11:57:59.041006400 +0100
5 error_reporting(E_ALL);
7 +$_path_parts = explode('/', dirname($_SERVER["SCRIPT_FILENAME"]));
8 +if($_path_parts[count($_path_parts) - 6] == 'local') // handle OMD local/ hierarchy
9 + $_base_dir = join(array_slice(explode('/' ,dirname($_SERVER["SCRIPT_FILENAME"])), 0, -6), '/');
11 + $_base_dir = join(array_slice(explode('/' ,dirname($_SERVER["SCRIPT_FILENAME"])), 0, -5), '/');
14 * Set the search path for included files
18 - .PATH_SEPARATOR.'../../server/core/classes'
19 - .PATH_SEPARATOR.'../../server/core/classes/objects'
20 - .PATH_SEPARATOR.'../../server/core/ext/php-gettext-1.0.12'
21 + .PATH_SEPARATOR.$_base_dir.'/local/share/nagvis/htdocs/server/core/classes'
22 + .PATH_SEPARATOR.$_base_dir.'/local/share/nagvis/htdocs/server/core/classes/objects'
23 + .PATH_SEPARATOR.$_base_dir.'/share/nagvis/htdocs/server/core/classes'
24 + .PATH_SEPARATOR.$_base_dir.'/share/nagvis/htdocs/server/core/classes/objects'
25 + .PATH_SEPARATOR.$_base_dir.'/share/nagvis/htdocs/server/core/ext/php-gettext-1.0.12'
28 // Enable/Disable profiling of NagVis using xhprof. To make use of this the
30 define('DEBUGLEVEL', 6);
32 // Path to the debug file
33 -define('DEBUGFILE', '../../../var/nagvis-debug.log');
34 +define('DEBUGFILE', $_base_dir.'/tmp/nagvis/nagvis-debug.log');
36 // It is possible to define a conf.d directory for splitting the main
37 // configuration in several files. Only the values defined in the CONST_MAINCFG
39 // The last value wins.
41 // Path to the main configuration file
42 -define('CONST_MAINCFG', '../../../etc/nagvis.ini.php');
43 -define('CONST_MAINCFG_CACHE', '../../../var/nagvis-conf');
44 +define('CONST_MAINCFG', $_base_dir.'/etc/nagvis/nagvis.ini.php');
45 +define('CONST_MAINCFG_CACHE', $_base_dir.'/tmp/nagvis/nagvis-conf');
47 // Path to the main configuration conf.d directory
48 -define('CONST_MAINCFG_DIR', '../../../etc/conf.d');
49 +define('CONST_MAINCFG_DIR', $_base_dir.'/etc/nagvis/conf.d');
51 // The directory below the NagVis root which is shared by the webserver
52 -define('HTDOCS_DIR', 'share');
53 +define('HTDOCS_DIR', 'htdocs');
55 // Needed minimal PHP version
56 define('CONST_NEEDED_PHP_VERSION', '5.0');