Commit 94c7f441633324c75a490fadf29a887098fc30d3

Authored by Paul Barrett
1 parent 6c7e5e46

Fixed windows absolute paths broken by directory structure changes

Committed by: Paul Barrett
setup/wizard/steps/database.php
@@ -778,19 +778,19 @@ class database extends Step @@ -778,19 +778,19 @@ class database extends Step
778 private function writeBinaries() { 778 private function writeBinaries() {
779 // if Windows, attempt to insert full paths to binaries 779 // if Windows, attempt to insert full paths to binaries
780 if (WINDOWS_OS) { 780 if (WINDOWS_OS) {
781 - $winBinaries = array('php' => array(0 => 'externalBinary', 1 => 'ZendServer\bin\php.exe'),  
782 - 'python' => array(0 => 'externalBinary', 1 => 'openoffice\program\python.exe'),  
783 - 'java' => array(0 => 'externalBinary', 1 => 'jre\bin\java.exe'),  
784 - 'convert' => array(0 => 'externalBinary', 1 => 'bin\imagemagick\convert.exe'),  
785 - 'df' => array(0 => 'externalBinary', 1 => 'bin\gnuwin32\df.exe'),  
786 - 'zip' => array(0 => 'export', 1 => 'bin\zip\zip.exe'),  
787 - 'unzip' => array(0 => 'import', 1 => 'bin\unzip\unzip.exe')); 781 + $winBinaries = array('php' => array(0 => 'externalBinary', 1 => $this->util->useZendPhp() . 'php.exe'),
  782 + 'python' => array(0 => 'externalBinary', 1 => SYSTEM_ROOT . 'openoffice\program\python.exe'),
  783 + 'java' => array(0 => 'externalBinary', 1 => SYSTEM_ROOT . 'java\jre\bin\java.exe'),
  784 + 'convert' => array(0 => 'externalBinary', 1 => SYSTEM_ROOT . 'bin\imagemagick\convert.exe'),
  785 + 'df' => array(0 => 'externalBinary', 1 => SYSTEM_ROOT . 'bin\gnuwin32\df.exe'),
  786 + 'zip' => array(0 => 'export', 1 => SYSTEM_ROOT . 'bin\zip\zip.exe'),
  787 + 'unzip' => array(0 => 'import', 1 => SYSTEM_ROOT . 'bin\unzip\unzip.exe'));
788 foreach ($winBinaries as $displayName => $bin) 788 foreach ($winBinaries as $displayName => $bin)
789 { 789 {
790 // continue without attempting to set the path if we can't find the file in the specified location 790 // continue without attempting to set the path if we can't find the file in the specified location
791 - if (!file_exists(SYSTEM_ROOT . $bin[1])) continue; 791 + if (!file_exists($bin[1])) continue;
792 792
793 - $updateBin = 'UPDATE config_settings c SET c.value = "'. str_replace('\\', '\\\\', SYSTEM_ROOT . $bin[1]) . '" ' 793 + $updateBin = 'UPDATE config_settings c SET c.value = "'. str_replace('\\', '\\\\', $bin[1]) . '" '
794 . 'where c.group_name = "' . $bin[0] . '" and c.display_name = "'.$displayName.'";'; 794 . 'where c.group_name = "' . $bin[0] . '" and c.display_name = "'.$displayName.'";';
795 $this->util->dbUtilities->query($updateBin); 795 $this->util->dbUtilities->query($updateBin);
796 } 796 }