diff --git a/setup/migrate/migrater.php b/setup/migrate/migrater.php
index dff40d1..d7b6907 100644
--- a/setup/migrate/migrater.php
+++ b/setup/migrate/migrater.php
@@ -540,6 +540,9 @@ class Migrater {
$this->_landing();
} elseif ($res == 'landing') {
$this->_landing();
+ } elseif ($res == 'binstall') {
+ $util = new MigrateUtil();
+ $util->redirect('../wizard/index.php?step_name=dependencies');
} else {
}
break;
@@ -550,10 +553,10 @@ class Migrater {
$util = new MigrateUtil();
$util->redirect('../wizard/index.php?step_name=installtype');
break;
- case 'binstall':
- $util = new MigrateUtil();
- $util->redirect('../wizard/index.php?step_name=dependencies');
- break;
+// case 'binstall':
+// $util = new MigrateUtil();
+// $util->redirect('../wizard/index.php?step_name=dependencies');
+// break;
default:
// TODO : handle silent
$this->_landing();
diff --git a/setup/migrate/steps/migrateComplete.php b/setup/migrate/steps/migrateComplete.php
index e3dda6f..dc6db59 100644
--- a/setup/migrate/steps/migrateComplete.php
+++ b/setup/migrate/steps/migrateComplete.php
@@ -57,6 +57,14 @@ class migrateComplete extends Step {
*/
protected $mysqlServiceName = "KTMysql";
+ /**
+ * Name of BitRock Stack MySql
+ *
+ * @access protected
+ * @var string
+ */
+ protected $zendMysql = "MySQL_ZendServer51";
+
/**
* Returns step state
*
@@ -67,23 +75,25 @@ class migrateComplete extends Step {
*/
function doStep() {
$this->temp_variables = array("step_name"=>"complete", "silent"=>$this->silent);
- $this->doRun();
- return 'landing';
+ return $this->doRun();
}
function doRun() {
+ $this->checkSqlDump();
if(!$this->inStep("complete")) {
- $this->checkSqlDump();
+
return 'landing';
}
if($this->next()) {
+ $this->checkZendMysql();
if($this->checkMysql()) {
- return 'next';
+ return 'binstall';
} else {
return 'error';
}
}
$this->removeInstallSessions();
+ return 'landing';
}
private function removeInstallSessions() {
@@ -132,17 +142,51 @@ class migrateComplete extends Step {
$running = true;
}
if($running) {
- $this->temp_variables['services']['KTMysql']['class'] = "cross";
- $this->temp_variables['services']['KTMysql']['name'] = "KTMysql";
- $this->temp_variables['services']['KTMysql']['msg'] = "Service Running";
+ $this->temp_variables['ktmysql']['class'] = "cross";
+ $this->temp_variables['ktmysql']['name'] = "KTMysql";
+ $this->temp_variables['ktmysql']['msg'] = "Service Running";
$this->error[] = "Service : KTMysql running.
";
return false;
} else {
- $this->temp_variables['services']['KTMysql']['class'] = "tick";
- $this->temp_variables['services']['KTMysql']['name'] = "KTMysql";
- $this->temp_variables['services']['KTMysql']['msg'] = "Service has been uninstalled";
+ $this->temp_variables['ktmysql']['class'] = "tick";
+ $this->temp_variables['ktmysql']['name'] = "KTMysql";
+ $this->temp_variables['ktmysql']['msg'] = "Service has been uninstalled";
return true;
}
}
+
+ private function checkZendMysql() {
+ $running = false;
+ if(WINDOWS_OS) {
+ $cmd = "sc query {$this->zendMysql}";
+ $response = $this->util->pexec($cmd);
+ if($response['out']) {
+ $state = preg_replace('/^STATE *\: *\d */', '', trim($response['out'][3])); // Status store in third key
+ }
+ if($state == "STARTED")
+ $running = true;
+ } else {
+ //TODO : Read fomr my.cnf file
+ $mysqlPid = "/var/run/mysqld/mysqld.sock";
+ if(file_exists($mysqlPid))
+ $running = true;
+ }
+ if($running) {
+ $this->temp_variables['zmysql']['class'] = "tick";
+ $this->temp_variables['zmysql']['name'] = "KTMysql";
+ $this->temp_variables['zmysql']['msg'] = "Service Running";
+ return true;
+ } else {
+ $this->temp_variables['zmysql']['class'] = "cross";
+ $this->temp_variables['zmysql']['name'] = "KTMysql";
+ $this->temp_variables['zmysql']['msg'] = "Service has been uninstalled";
+ $this->error[] = "Service : KTMysql running.
";
+ return false;
+ }
+ }
+
+ public function getErrors() {
+ return $this->error;
+ }
}
?>
\ No newline at end of file
diff --git a/setup/migrate/steps/migrateInstallation.php b/setup/migrate/steps/migrateInstallation.php
index 0718624..afba814 100644
--- a/setup/migrate/steps/migrateInstallation.php
+++ b/setup/migrate/steps/migrateInstallation.php
@@ -247,7 +247,6 @@ class migrateInstallation extends step
$this->urlPaths = array(array('name'=> 'Var Directory', 'path'=> $varDir),
array('name'=> 'Log Directory', 'path'=> $varDir.DS.'log'),
array('name'=> 'Document Root', 'path'=> $varDir.DS.'Documents'),
- array('name'=> 'UI Directory', 'path'=> $froot.DS.'presentation'.DS.'lookAndFeel'.DS.'knowledgeTree'),
array('name'=> 'Temporary Directory', 'path'=> $varDir.DS.'tmp'),
array('name'=> 'Cache Directory', 'path'=> $varDir.DS.'cache'),
array('name'=> 'Upload Directory', 'path'=> $varDir.DS.'uploads'),
diff --git a/setup/migrate/templates/complete.tpl b/setup/migrate/templates/complete.tpl
index de9745d..fe364d8 100644
--- a/setup/migrate/templates/complete.tpl
+++ b/setup/migrate/templates/complete.tpl
@@ -16,9 +16,19 @@
'>