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 --- trunk/init.php~ 2009-06-27 17:31:32.000000000 +0300
12 +++ trunk/init.php 2009-06-27 17:33:35.745565456 +0300
14 // | Authors: Elan Ruusamäe <glen@delfi.ee> |
15 // +----------------------------------------------------------------------+
17 -if (!file_exists(dirname(__FILE__) . '/config/config.php')) {
18 +if (!file_exists('/etc/webapps/eventum/config.php')) {
19 Header('Location: setup/');
25 define('APP_PATH', realpath(dirname(__FILE__)));
26 -define('APP_CONFIG_PATH', APP_PATH . '/config');
27 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
29 // include local site config. may override any default
30 require_once APP_CONFIG_PATH . '/config.php';
34 if (!defined('APP_TPL_COMPILE_PATH')) {
35 - define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
36 + define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
39 if (!defined('APP_INC_PATH')) {
40 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
43 -if (!defined('APP_PEAR_PATH')) {
44 - define('APP_PEAR_PATH', APP_PATH . '/lib/pear');
47 if (!defined('APP_SMARTY_PATH')) {
48 - define('APP_SMARTY_PATH', APP_PATH . '/lib/Smarty');
49 + define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
52 if (!defined('APP_JPGRAPH_PATH')) {
56 if (!defined('APP_LOCKS_PATH')) {
57 - define('APP_LOCKS_PATH', APP_PATH . '/locks');
58 + define('APP_LOCKS_PATH', '/var/run/eventum/');
61 if (!defined('APP_SQL_PATCHES_PATH')) {
65 if (!defined('APP_LOG_PATH')) {
66 - define('APP_LOG_PATH', APP_PATH . '/logs');
67 + define('APP_LOG_PATH', '/var/log/eventum');
70 if (!defined('APP_ROUTED_MAILS_SAVEDIR')) {
71 --- trunk/htdocs/setup/index.php~ 2009-06-27 17:34:22.000000000 +0300
72 +++ trunk/htdocs/setup/index.php 2009-06-27 17:35:07.108898271 +0300
74 define('APP_PATH', realpath(dirname(__FILE__) . '/../..'));
75 define('APP_INC_PATH', APP_PATH . '/lib/eventum');
76 define('APP_PEAR_PATH', APP_INC_PATH . '/lib/pear');
77 -define('APP_SMARTY_PATH', APP_INC_PATH . '/lib/Smarty');
78 -define('APP_CONFIG_PATH', APP_PATH . '/config');
79 +define('APP_SMARTY_PATH', '/usr/share/php/Smarty');
80 +define('APP_CONFIG_PATH', '/etc/webapps/eventum');
81 define('APP_SETUP_FILE', APP_CONFIG_PATH . '/setup.php');
82 define('APP_TPL_PATH', APP_PATH . '/templates');
83 -define('APP_TPL_COMPILE_PATH', APP_PATH . '/templates_c');
84 -define('APP_LOG_PATH', APP_PATH . '/logs');
85 +define('APP_TPL_COMPILE_PATH', '/var/cache/eventum');
86 +define('APP_LOG_PATH', '/var/log/eventum');
87 define('APP_ERROR_LOG', APP_LOG_PATH . '/errors.log');
88 -define('APP_LOCKS_PATH', APP_PATH . '/locks');
89 +define('APP_LOCKS_PATH', '/var/run/eventum');
91 header('Content-Type: text/html; charset=' . APP_CHARSET);
94 if (ini_get('file_uploads') != "1") {
95 $errors[] = "The 'file_uploads' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly.";
97 - $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", TRUE);
98 - if (!empty($error)) {
101 $error = checkPermissions(APP_LOCKS_PATH, "Directory '" . APP_LOCKS_PATH . "'", TRUE);
102 if (!empty($error)) {
105 $setup_file_path = APP_SETUP_FILE;
108 - // check if config directory is writable
109 - if (!is_writable(APP_CONFIG_PATH)) {
110 - return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again.";
112 // need to create a random private key variable
113 $private_key = '<?php
114 $private_key = "' . md5(microtime()) . '";