diff --git a/setup/wizard/lib/helpers/config-path-mock b/setup/wizard/lib/helpers/config-path-mock
index 6ea6553..f31669e 100644
--- a/setup/wizard/lib/helpers/config-path-mock
+++ b/setup/wizard/lib/helpers/config-path-mock
@@ -1,10 +1,8 @@
-/var/www/installers/knowledgetree/var_test/
+/var/lib/knowledgetree
/var/www/installers/knowledgetree/config/config.ini
-/var/www/installers/knowledgetree/var_test/cache
-/var/www/installers/knowledgetree/var_test/Documents
-/var/www/installers/knowledgetree/var_test/indexes
-/var/www/installers/knowledgetree/var_test/log
-/var/www/installers/knowledgetree/var_test/Pdf
-/var/www/installers/knowledgetree/var_test/proxies
-/var/www/installers/knowledgetree/var_test/tmp
-/var/www/installers/knowledgetree/var_test/uploads
\ No newline at end of file
+/var/log/knowledgetree
+/var/tmp/knowledgetree
+/var/lib/knowledgetree/Documents
+/var/lib/knowledgetree/indexes
+/var/lib/knowledgetree/proxies
+/var/lib/knowledgetree/uploads
\ No newline at end of file
diff --git a/setup/wizard/lib/helpers/systemCheck.php b/setup/wizard/lib/helpers/systemCheck.php
new file mode 100644
index 0000000..e927c90
--- /dev/null
+++ b/setup/wizard/lib/helpers/systemCheck.php
@@ -0,0 +1,17 @@
+';
+ }
+ if(is_writable(SYS_VAR_DIR.DS."bin")) {
+ echo 'var/bin is writable
';
+ }
+ if(is_writable(SYS_VAR_DIR.DS."tmp")) {
+ echo 'var/tmp is writable
';
+ }
+ if(is_writable(SYS_VAR_DIR.DS."Documents")) {
+ echo 'var/Documents is writable
';
+ }
+
+?>
\ No newline at end of file
diff --git a/setup/wizard/lib/services/unixLucene.php b/setup/wizard/lib/services/unixLucene.php
index b5bb023..0250c84 100644
--- a/setup/wizard/lib/services/unixLucene.php
+++ b/setup/wizard/lib/services/unixLucene.php
@@ -58,6 +58,7 @@ class unixLucene extends unixService {
}
public function load() {
+ $this->setSystemOutputDir();
$this->setLuceneDir(SYSTEM_DIR."bin".DS."luceneserver".DS);
$this->setIndexerDir(SYSTEM_DIR."search2".DS."indexing".DS."bin".DS);
$this->setLucenePidFile("lucene_test.pid");
@@ -67,6 +68,13 @@ class unixLucene extends unixService {
$this->setShutdownScript("shutdown.php");
}
+ function setSystemOutputDir() {
+ $conf = $this->util->getDataFromSession('configuration');
+ print_r($conf);
+ die;
+// $conf['path'][''];
+ }
+
public function setIndexerDir($indexerDir) {
$this->indexerDir = $indexerDir;
}
diff --git a/setup/wizard/lib/services/unixOpenOffice.php b/setup/wizard/lib/services/unixOpenOffice.php
index f2916cb..e711fae 100644
--- a/setup/wizard/lib/services/unixOpenOffice.php
+++ b/setup/wizard/lib/services/unixOpenOffice.php
@@ -68,6 +68,7 @@ class unixOpenOffice extends unixService {
}
public function load() {
+
$this->setPort("8100");
$this->setHost("localhost");
$this->setLog("openoffice.log");
diff --git a/setup/wizard/lib/services/windowsLucene.php b/setup/wizard/lib/services/windowsLucene.php
index be2c4b9..1b7e413 100644
--- a/setup/wizard/lib/services/windowsLucene.php
+++ b/setup/wizard/lib/services/windowsLucene.php
@@ -140,6 +140,7 @@ class windowsLucene extends windowsService {
* @return void
*/
public function load() {
+ $this->setSystemOutputDir();
$this->setJavaBin();
$this->setLuceneDIR(SYSTEM_DIR."bin".DS."luceneserver");
$this->setLuceneExe("KTLuceneService.exe");
@@ -150,6 +151,13 @@ class windowsLucene extends windowsService {
$this->setLuceneError("lucene-err.txt");
}
+ function setSystemOutputDir() {
+ $conf = $this->util->getDataFromSession('configuration');
+ print_r($conf);
+ die;
+// $conf['path'][''];
+ }
+
/**
* Retrieve Status Service
*
diff --git a/setup/wizard/steps/configuration.php b/setup/wizard/steps/configuration.php
index 494ed1d..8d9444f 100644
--- a/setup/wizard/steps/configuration.php
+++ b/setup/wizard/steps/configuration.php
@@ -500,30 +500,13 @@ class configuration extends Step
*/
private function getDirectories()
{
- if(isset($this->confpaths['configIni'])) {
- if(isset($this->confpaths['configIni'])) { // Check if theres a config path
- $configPath = realpath("../../{$this->confpaths['configIni']}"); // Relative to Config Path File
- if($configPath == '') { // Absolute path probably entered
- $configPath = realpath("{$this->confpaths['configIni']}"); // Get relative path
- }
- } else {
- $configPath = realpath('../../config/config.ini');
- }
- } else {
- $configPath = '${fileSystemRoot}/config/config.ini';
- }
- if(isset($this->confpaths['var'])) {
- $varPath = $this->confpaths['var'];
- } else {
- $varPath = '${fileSystemRoot}/var';
- }
return array(
- array('name' => 'Var Directory', 'setting' => 'varDirectory', 'path' => $varPath, 'create' => false),
+ array('name' => 'Var Directory', 'setting' => 'varDirectory', 'path' => '${varDirectory}', 'create' => false),
array('name' => 'Document Directory', 'setting' => 'documentRoot', 'path' => '${varDirectory}/Documents', 'create' => true),
array('name' => 'Log Directory', 'setting' => 'logDirectory', 'path' => '${varDirectory}/log', 'create' => true),
array('name' => 'Temporary Directory', 'setting' => 'tmpDirectory', 'path' => '${varDirectory}/tmp', 'create' => true),
array('name' => 'Uploads Directory', 'setting' => 'uploadDirectory', 'path' => '${varDirectory}/uploads', 'create' => true),
- array('name' => 'Configuration File', 'setting' => 'configFile', 'path' => $configPath, 'create' => false),
+ array('name' => 'Configuration File', 'setting' => 'configFile', 'path' => '${fileSystemRoot}/config/config.ini', 'create' => false),
);
}
@@ -555,20 +538,51 @@ class configuration extends Step
* @return array The path information
*/
private function getFromConfigPath() {
- if(isset($this->confpaths['Documents'])) { // Simple check to see if any paths were written
- return array (
- array('name' => 'Configuration File', 'setting' => 'configFile', 'path' => $this->confpaths['configIni'], 'create' => false),
- array('name' => 'Document Directory', 'setting' => 'documentRoot', 'path' => $this->confpaths['Documents'], 'create' => true),
- array('name' => 'Cache Directory', 'setting' => 'cacheDirectory', 'path' => $this->confpaths['cache'], 'create' => true),
- array('name' => 'Index Directory', 'setting' => 'indexDirectory', 'path' => $this->confpaths['indexes'], 'create' => true),
- array('name' => 'Log Directory', 'setting' => 'logDirectory', 'path' => $this->confpaths['log'], 'create' => true),
- array('name' => 'Proxy Directory', 'setting' => 'proxiesDirectory', 'path' => $this->confpaths['proxies'], 'create' => true),
- array('name' => 'Temporary Directory', 'setting' => 'tmpDirectory', 'path' => $this->confpaths['tmp'], 'create' => true),
- array('name' => 'Uploads Directory', 'setting' => 'uploadDirectory', 'path' => $this->confpaths['uploads'], 'create' => true),
- );
+ $configs = array();
+ if(isset($this->confpaths['configIni'])) { // Simple check to see if any paths were written
+ $configPath = realpath("../../{$this->confpaths['configIni']}"); // Relative to Config Path File
+ if($configPath == '') { // Absolute path probably entered
+ $configPath = realpath("{$this->confpaths['configIni']}"); // Get absolute path
+ if($configPath == '') {
+ $configPath = realpath('../../config/config.ini');
+ }
+ }
+ } else {
+ $configPath = '${fileSystemRoot}/config/config.ini';
+ }
+ $configs['configFile'] = array('name' => 'Configuration File', 'setting' => 'configFile', 'path' => $configPath, 'create' => false);
+ if(isset($this->confpaths['Documents'])) {
+ $docsPath = $this->confpaths['Documents'];
+ } else {
+ $docsPath = '${varDirectory}/Documents';
+ }
+ $configs['documentRoot'] = array('name' => 'Document Directory', 'setting' => 'documentRoot', 'path' => $docsPath, 'create' => true);
+ if(isset($this->confpaths['log'])) {
+ $logPath = $this->confpaths['log'];
} else {
- return $this->getDirectories();
+ $logPath = '${varDirectory}/log';
+ }
+ $configs['logDirectory'] = array('name' => 'Log Directory', 'setting' => 'logDirectory', 'path' => $logPath, 'create' => true);
+ if(isset($this->confpaths['tmp'])) {
+ $tmpPath = $this->confpaths['tmp'];
+ } else {
+ $tmpPath = '${varDirectory}/tmp';
+ }
+ $configs['tmpDirectory'] = array('name' => 'Temporary Directory', 'setting' => 'tmpDirectory', 'path' => $tmpPath, 'create' => true);
+ if(isset($this->confpaths['uploads'])) {
+ $uploadsPath = $this->confpaths['uploads'];
+ } else {
+ $uploadsPath = '${varDirectory}/uploads';
+ }
+ $configs['uploadDirectory'] = array('name' => 'Uploads Directory', 'setting' => 'uploadDirectory', 'path' => $uploadsPath, 'create' => true);
+ if(isset($this->confpaths['var'])) {
+ $varPath = $this->confpaths['var'];
+ } else {
+ $varPath = '${fileSystemRoot}/var';
}
+ $configs['varDirectory'] = array('name' => 'Var Directory', 'setting' => 'varDirectory', 'path' => $varPath, 'create' => false);
+
+ return $configs;
}
/**