Commit d77193c95190d7c21804ac079ba9a02a649038dd

Authored by Paul Barrett
1 parent 432cca1a

Fixed writing of taskrunner.bat on Windows and modified Zend php location detection

Committed by: Paul Barrett

Reviewed by: Jarrett Jordaan
bin/win32/schedulerService.php
@@ -54,14 +54,13 @@ global $default; @@ -54,14 +54,13 @@ global $default;
54 54
55 $config = KTConfig::getSingleton(); 55 $config = KTConfig::getSingleton();
56 $schedulerInterval = $config->get('KnowledgeTree/schedulerInterval',30); // interval in seconds 56 $schedulerInterval = $config->get('KnowledgeTree/schedulerInterval',30); // interval in seconds
57 -//$phpPath = $config->get('externalBinary/php','php'); // TODO - fix me  
58 57
59 // Change to knowledgeTree/bin folder 58 // Change to knowledgeTree/bin folder
60 $dir = realpath(dirname(__FILE__) . '/..'); 59 $dir = realpath(dirname(__FILE__) . '/..');
61 chdir($dir); 60 chdir($dir);
62 61
63 // Setup php binary path 62 // Setup php binary path
64 -$phpPath = realpath('../../php/php.exe'); 63 +$phpPath = $config->get('externalBinary/php','php');
65 if (!is_file($phpPath)) 64 if (!is_file($phpPath))
66 { 65 {
67 $default->log->error("Scheduler: php not found: $phpPath"); 66 $default->log->error("Scheduler: php not found: $phpPath");
setup/wizard/installUtil.php
@@ -764,12 +764,16 @@ class InstallUtil { @@ -764,12 +764,16 @@ class InstallUtil {
764 if($this->installEnvironment() == 'Zend') { 764 if($this->installEnvironment() == 'Zend') {
765 if(WINDOWS_OS) { // For Zend Installation only 765 if(WINDOWS_OS) { // For Zend Installation only
766 $sysdir = explode(DS, SYSTEM_DIR); 766 $sysdir = explode(DS, SYSTEM_DIR);
767 - array_pop($sysdir);  
768 - array_pop($sysdir); 767 + // pop until we find Zend, this should be our Zend root :)
  768 + $current = array_pop($sysdir);
  769 + while ($current != 'Zend') {
  770 + $current = array_pop($sysdir);
  771 + }
769 $zendsys = ''; 772 $zendsys = '';
770 foreach ($sysdir as $v) { 773 foreach ($sysdir as $v) {
771 $zendsys .= $v.DS; 774 $zendsys .= $v.DS;
772 } 775 }
  776 + $zendsys .= 'Zend'.DS;
773 $bin = $zendsys."ZendServer".DS."bin".DS; 777 $bin = $zendsys."ZendServer".DS."bin".DS;
774 if(file_exists($bin)) 778 if(file_exists($bin))
775 return $bin; 779 return $bin;