Changeset 1104
- Timestamp:
- 09/07/08 14:11:01 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/arnoschn/cache/lib/utils/scripts/ci-test.php
r1102 r1104 185 185 $this->_createCiPhpConfigFile(); 186 186 } 187 187 $returnVal = $this->_checkWebserver2($this->settings['test-url']) && $returnVal; 188 188 return $returnVal; 189 189 // if all passes return true … … 204 204 return true; 205 205 } 206 function _checkWebserver2($url) 207 { 208 $return = true; 209 $testIndexPage = @file_get_contents($url.'/'); 210 if ($testIndexPage!='Test::page::index') { 211 $this->error('Webserver Configuration problems:'."\n" .$testIndexPage."\n\n"); 212 $return = false; 213 } else { 214 $this->info('Web Server is configured correctly'); 215 } 216 return $return; 217 } 218 206 219 function _checkWebServer($url) 207 220 { … … 245 258 $this->info('Web Server is reachable at '.$url); 246 259 247 $testIndexPage = @file_get_contents($url.'/'); 248 if ($testIndexPage!='Test::page::index') { 249 $this->error('Webserver Configuration problems:'."\n" .$testIndexPage."\n\n"); 250 $return = false; 251 } else { 252 $this->info('Web Server is configured correctly'); 253 } 260 254 261 255 262 return $return; … … 324 331 $file = AK_BASE_DIR.DS.'config'.DS.'ci-config.php'; 325 332 $settings = array(); 326 $settings['${testing-url}'] = $this->_promptForTestingUrl(); 327 333 $settings['${testing-url}'] = $this->settings['test-url']; 328 334 return file_put_contents($file,str_replace(array_keys($settings),array_values($settings),file_get_contents($templateFile)))>0; 329 335 } … … 337 343 $settings['${php4}'] = $this->_promptForPhp('php4'); 338 344 $settings['${php5}'] = $this->_promptForPhp('php5'); 345 $settings['${test-url}'] = $this->_promptForTestingUrl(); 339 346 return file_put_contents($file,str_replace(array_keys($settings),array_values($settings),file_get_contents($templateFile)))>0; 340 347 }
