version()); require_once('../inc/inc.ClassSettings.php'); $configDir = Settings::getConfigDir(); /** * Check if ENABLE_INSTALL_TOOL exists in config dir */ if (!$configDir) { echo "Fatal error! I could not even find a configuration directory."; exit; } if (!file_exists($configDir."/ENABLE_INSTALL_TOOL")) { echo "For installation of SeedDMS, you must create the file ".$configDir."/ENABLE_INSTALL_TOOL"; exit; } if (!file_exists($configDir."/settings.xml")) { if(!copy("settings.xml.template_install", $configDir."/settings.xml")) { echo "Could not create initial configuration file from template. Check directory permission of conf/."; exit; } } // Set folders settings $settings = new Settings(); $settings->load($configDir."/settings.xml"); $rootDir = realpath (".."); $installPath = realpath ("install.php"); $installPath = str_replace ("\\", "/" , $installPath); $tmpToDel = str_replace ($rootDir, "" , $installPath); $httpRoot = str_replace ($tmpToDel, "" , $_SERVER["SCRIPT_NAME"]).'/'; /* Correct rootDir to ensure it points to 'www' instead of the versioned * seeddms dir. */ if(file_exists($rootDir.'/../www')) $rootDir = realpath($rootDir.'/..').'/www'; $rootDir = str_replace ("\\", "/" , $rootDir) . "/"; do { $httpRoot = str_replace ("//", "/" , $httpRoot, $count); } while ($count<>0); $msg = ''; if($rootDir != $settings->_rootDir) { $msg = "Your Root directory has been modified to fit your installation path!"; } $settings->_rootDir = $rootDir; if(!$settings->_contentDir || !is_dir($settings->_contentDir)) { $settings->_contentDir = realpath($settings->_rootDir."..") . '/data/'; $settings->_luceneDir = $settings->_contentDir . 'lucene/'; $settings->_stagingDir = $settings->_contentDir . 'staging/'; $settings->_cacheDir = $settings->_contentDir . 'cache/'; $settings->_backupDir = $settings->_contentDir . 'backup/'; } else { if(!$settings->_cacheDir) { $settings->_cacheDir = $settings->_contentDir . 'cache/'; } } if($settings->_dbDriver == 'sqlite') { if(!$settings->_dbDatabase || !file_exists($settings->_dbDatabase)) { $settings->_dbDatabase = $settings->_contentDir.'content.db'; } } $settings->_httpRoot = $httpRoot; if(isset($settings->_extraPath)) ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path')); /** * Include GUI + Language */ $theme = "bootstrap"; include("../inc/inc.Language.php"); include "../languages/en_GB/lang.inc"; include("../inc/inc.ClassUI.php"); include("class.Install.php"); $view = new SeedDMS_View_Install(array('settings'=>$settings, 'session'=>null, 'sitename'=>'SeedDMS', 'printdisclaimer'=>0, 'showmissingtranslations'=>0, 'absbaseprefix'=>'/', 'enabledropfolderlist'=>0, 'enablemenutasks'=>0, 'configdir'=>$configDir)); $view->install($msg);