1 --- ./lib/eventum/class.monitor.php~ 2005-02-22 21:50:49.000000000 +0200
2 +++ ./lib/eventum/class.monitor.php 2005-02-22 23:04:50.000000000 +0200
7 + $required_directories = array();
8 foreach ($required_directories as $dir_path => $options) {
9 // check if directory exists
10 if (!file_exists($dir_path)) {
11 --- ./cli/eventum 2009-06-27 19:46:44.401524716 +0300
12 +++ ./cli/eventum 2009-06-27 19:45:22.781438493 +0300
16 // definitions of path related variables
17 -define('APP_PATH', dirname(__FILE__) . '/');
18 -define('APP_INC_PATH', APP_PATH . '/lib/eventum');
19 -define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
20 +define('APP_PATH', '/usr/share/eventum');
21 +define('APP_INC_PATH', APP_PATH . '/cli');
23 if (defined('APP_PEAR_PATH')) {
24 set_include_path(APP_PEAR_PATH . PATH_SEPARATOR . get_include_path());
25 --- trunk/init.php~ 2009-06-27 17:31:32.000000000 +0300
26 +++ trunk/init.php 2009-06-27 17:33:35.745565456 +0300
28 // | Authors: Elan Ruusamäe <glen@delfi.ee> |
29 // +----------------------------------------------------------------------+
31 -if (!file_exists(dirname(__FILE__) . '/config/config.php')) {
32 +if (!file_exists('/etc/webapps/eventum/config.php')) {
33 Header('Location: setup/');
39 define('APP_PATH', realpath(dirname(__FILE__)));
40 -define('APP_CONFIG_PATH', APP_PATH . '/config');
41 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
43 // include local site config. may override any default
44 require_once APP_CONFIG_PATH . '/config.php';
48 if (!defined('APP_TPL_COMPILE_PATH')) {
49 - define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
50 + define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
53 if (!defined('APP_INC_PATH')) {
54 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
57 -if (!defined('APP_PEAR_PATH')) {
58 - define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
61 if (!defined('APP_SMARTY_PATH')) {
62 - define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
63 + define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
66 if (!defined('APP_JPGRAPH_PATH')) {
70 if (!defined('APP_LOCKS_PATH')) {
71 - define('APP_LOCKS_PATH', APP_PATH . '/locks');
72 + define('APP_LOCKS_PATH', '/var/run/eventum/');
75 if (!defined('APP_SQL_PATCHES_PATH')) {
79 if (!defined('APP_LOG_PATH')) {
80 - define('APP_LOG_PATH', APP_PATH . '/logs');
81 + define('APP_LOG_PATH', '/var/log/eventum');
84 if (!defined('APP_ROUTED_MAILS_SAVEDIR')) {
85 --- trunk/htdocs/setup/index.php~ 2009-06-27 17:34:22.000000000 +0300
86 +++ trunk/htdocs/setup/index.php 2009-06-27 17:35:07.108898271 +0300
88 define('APP_PATH', realpath(dirname(__FILE__) . '/../..'));
89 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
90 define('APP_PEAR_PATH', APP_INC_PATH . '/lib/pear');
91 -define('APP_SMARTY_PATH', APP_INC_PATH . '/lib/Smarty');
92 -define('APP_CONFIG_PATH', APP_PATH . '/config');
93 +define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
94 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
95 define('APP_SETUP_FILE', APP_CONFIG_PATH . '/setup.php');
96 define('APP_TPL_PATH', APP_PATH . '/templates');
97 -define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
98 -define('APP_LOG_PATH', APP_PATH . '/logs');
99 +define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
100 +define('APP_LOG_PATH', '/var/log/eventum');
101 define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log');
102 -define('APP_LOCKS_PATH', APP_PATH . '/locks');
103 +define('APP_LOCKS_PATH', '/var/run/eventum');
105 header('Content-Type: text/html; charset=' . APP_CHARSET);
108 if (ini_get('file_uploads') != "1") {
109 $errors[] = "The 'file_uploads' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
111 - $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", TRUE);
112 - if (!empty($error)) {
113 - $errors[] = $error;
115 $error = checkPermissions(APP_LOCKS_PATH, "Directory '" . APP_LOCKS_PATH . "'", TRUE);
116 if (!empty($error)) {
119 $setup_file_path = APP_SETUP_FILE;
122 - // check if config directory is writable
123 - if (!is_writable(APP_CONFIG_PATH)) {
124 - return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again.";
126 // need to create a random private key variable
127 $private_key = '<?php
128 $private_key = "' . md5(microtime()) . '";