[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - Setup Check Installation * 4 * http://www.eGroupWare.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 /* $Id: check_install.php 22249 2006-08-15 17:01:33Z ralfbecker $ */ 13 14 $run_by_webserver = !!$_SERVER['PHP_SELF']; 15 $is_windows = strtoupper(substr(PHP_OS,0,3)) == 'WIN'; 16 17 if ($run_by_webserver) 18 { 19 $GLOBALS['egw_info'] = array( 20 'flags' => array( 21 'noheader' => True, 22 'nonavbar' => True, 23 'currentapp' => 'home', 24 'noapi' => True 25 )); 26 $safe_er = error_reporting(); 27 include ('./inc/functions.inc.php'); 28 error_reporting($safe_er); 29 30 $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_setup']->detection->check_header(); 31 if ($GLOBALS['egw_info']['setup']['stage']['header'] == '10') 32 { 33 // Check header and authentication 34 if (!$GLOBALS['egw_setup']->auth('Config') && !$GLOBALS['egw_setup']->auth('Header')) 35 { 36 Header('Location: index.php'); 37 exit; 38 } 39 } 40 $passed_icon = '<img src="templates/default/images/completed.png" title="Passed" alt="Passed" align="middle" />'; 41 $error_icon = '<img src="templates/default/images/incomplete.png" title="Error" alt="Error" align="middle" />'; 42 $warning_icon = '<img src="templates/default/images/dep.png" title="Warning" alt="Warning" align="middle" />'; 43 } 44 else 45 { 46 $passed_icon = '>>> Passed '; 47 $error_icon = '*** Error: '; 48 $warning_icon = '!!! Warning: '; 49 50 function lang($msg,$arg1=NULL,$arg2=NULL,$arg3=NULL,$arg4=NULL) 51 { 52 return is_null($arg1) ? $msg : str_replace(array('%1','%2','%3','%4'),array($arg1,$arg2,$arg3,$arg4),$msg); 53 } 54 } 55 $checks = array( 56 'phpversion' => array( 57 'func' => 'php_version', 58 'value' => 4.3, 59 'verbose_value' => '4.3+', 60 'recommended' => '5.0', 61 ), 62 'safe_mode' => array( 63 'func' => 'php_ini_check', 64 'value' => 0, 65 'verbose_value' => 'Off', 66 'warning' => lang('safe_mode is turned on, which is generaly a good thing as it makes your install more secure.')."\n". 67 lang('If safe_mode is turned on, eGW is not able to change certain settings on runtime, nor can we load any not yet loaded module.')."\n". 68 lang('*** You have to do the changes manualy in your php.ini (usualy in /etc on linux) in order to get eGW fully working !!!')."\n". 69 lang('*** Do NOT update your database via setup, as the update might be interrupted by the max_execution_time, which leaves your DB in an unrecoverable state (your data is lost) !!!') 70 ), 71 'magic_quotes_runtime' => array( 72 'func' => 'php_ini_check', 73 'value' => 0, 74 'verbose_value' => 'Off', 75 'safe_mode' => 'magic_quotes_runtime = Off' 76 ), 77 'register_globals' => array( 78 'func' => 'php_ini_check', 79 'value' => 0, 80 'verbose_value' => 'Off', 81 'warning' => lang("register_globals is turned On, eGroupWare does NOT require it and it's generaly more secure to have it turned Off") 82 ), 83 'memory_limit' => array( 84 'func' => 'php_ini_check', 85 'value' => '16M', 86 'check' => '>=', 87 'error' => lang('memory_limit is set to less than 16M: some applications of eGroupWare need more than the recommend 8M, expect occasional failures'), 88 'change' => 'memory_limit = 16M' 89 ), 90 'max_execution_time' => array( 91 'func' => 'php_ini_check', 92 'value' => 30, 93 'check' => '>=', 94 'error' => lang('max_execution_time is set to less than 30 (seconds): eGroupWare sometimes needs a higher execution_time, expect occasional failures'), 95 'safe_mode' => 'max_execution_time = 30' 96 ), 97 'file_uploads' => array( 98 'func' => 'php_ini_check', 99 'value' => 1, 100 'verbose_value' => 'On', 101 'error' => lang('File uploads are switched off: You can NOT use any of the filemanagers, nor can you attach files in several applications!'), 102 ), 103 'include_path' => array( 104 'func' => 'php_ini_check', 105 'value' => '.', 106 'check' => 'contain', 107 'error' => lang('include_path need to contain "." - the current directory'), 108 ), 109 'mysql' => array( 110 'func' => 'extension_check', 111 'warning' => "<div class='setup_info'>" . lang('The %1 extension is needed, if you plan to use a %2 database.','mysql','MySQL').'</div>' 112 ), 113 'pgsql' => array( 114 'func' => 'extension_check', 115 'warning' => '<div class="setup_info">' . lang('The %1 extension is needed, if you plan to use a %2 database.','pgsql','pgSQL').'</div>' 116 ), 117 'mssql' => array( 118 'func' => 'extension_check', 119 'warning' => '<div class="setup_info">' . lang('The %1 extension is needed, if you plan to use a %2 database.','mssql','MsSQL') . '</div>', 120 'win_only' => True 121 ), 122 'odbc' => array( 123 'func' => 'extension_check', 124 'warning' => '<div class="setup_info">' . lang('The %1 extension is needed, if you plan to use a %2 database.','odbc','MaxDB, MsSQL or Oracle') . '</div>', 125 ), 126 'oci8' => array( 127 'func' => 'extension_check', 128 'warning' => '<div class="setup_info">' . lang('The %1 extension is needed, if you plan to use a %2 database.','oci','Oracle') . '</div>', 129 ), 130 'mbstring' => array( 131 'func' => 'extension_check', 132 'warning' => '<div class="setup_info">' . lang('The mbstring extension is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "</div>" 133 ), 134 'mbstring.func_overload' => array( 135 'func' => 'php_ini_check', 136 'value' => 7, 137 'warning' => '<div class="setup_info">' . lang('The mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "</div>", 138 'change' => extension_loaded('mbstring') || function_exists('dl') && @dl(PHP_SHLIB_PREFIX.'mbstring.'.PHP_SHLIB_SUFFIX) ? 'mbstring.func_overload = 7' : '', 139 ), 140 'imap' => array( 141 'func' => 'extension_check', 142 'warning' => '<div class="setup_info">' . lang('The imap extension is needed by the two email apps (even if you use email with pop3 as protocoll).') . '</div>' 143 ), 144 'session' => array( 145 'func' => 'extension_check', 146 'warning' => '<div class="setup_info">' . lang('The session extension is needed to use php sessions (db-sessions work without).') . "</div>" 147 ), 148 '' => array( 149 'func' => 'pear_check', 150 'warning' => '<div class="setup_info">' . lang('PEAR is needed by SyncML or the iCal import+export of calendar.') . "</div>" 151 ), 152 'Log' => array( 153 'func' => 'pear_check', 154 'warning' => '<div class="setup_info">' . lang('PEAR::Log is needed by SyncML.').' '.lang('You can install it by running:').' pear install Log' . "</div>" 155 ), 156 'gd' => array( 157 'func' => 'gd_check', 158 ), 159 '.' => array( 160 'func' => 'permission_check', 161 'is_world_writable' => False, 162 'recursiv' => True 163 ), 164 'header.inc.php' => array( 165 'func' => 'permission_check', 166 'is_world_readable' => False, 167 'only_if_exists' => @$GLOBALS['egw_info']['setup']['stage']['header'] != 10 168 ), 169 'fudforum' => array( 170 'func' => 'permission_check', 171 'is_writable' => True, 172 'only_if_exists' => True 173 ), 174 ); 175 if (extension_loaded('session')) 176 { 177 //ini_set('session.save_path','/hugo'); 178 $checks[session_save_path()] = array( 179 'func' => 'permission_check', 180 'is_writable' => true, 181 'msg' => lang("Checking if php.ini setting session.save_path='%1' is writable by the webserver",session_save_path()), 182 'error' => lang('You will NOT be able to log into eGroupWare using PHP sessions: "session could not be verified" !!!'), 183 ); 184 } 185 // some constants for pre php4.3 186 if (!defined('PHP_SHLIB_SUFFIX')) 187 { 188 define('PHP_SHLIB_SUFFIX',$is_windows ? 'dll' : 'so'); 189 } 190 if (!defined('PHP_SHLIB_PREFIX')) 191 { 192 define('PHP_SHLIB_PREFIX',PHP_SHLIB_SUFFIX == 'dll' ? 'php_' : ''); 193 } 194 195 function php_version($name,$args) 196 { 197 global $passed_icon, $error_icon; 198 199 $version_ok = (float) phpversion() >= $args['value']; 200 201 echo '<div>'.($version_ok ? $passed_icon : $error_icon).' <span'.($version_ok ? '' : ' class="setup_error"').'>'. 202 lang('Checking required PHP version %1 (recommended %2)',$args['verbose_value'],$args['recommended']).': '. 203 phpversion().' ==> '.($version_ok ? lang('True') : lang('False'))."</span></div>\n"; 204 } 205 206 function pear_check($package,$args) 207 { 208 global $passed_icon, $warning_icon; 209 static $pear_available = null; 210 211 if (is_null($pear_available)) 212 { 213 $pear_available = @include('PEAR.php'); 214 215 if (!class_exists('PEAR')) $pear_available = false; 216 217 echo '<div>'.($pear_available ? $passed_icon : $warning_icon).' <span'.($pear_available ? '' : ' class="setup_warning"').'>'. 218 lang('Checking PEAR%1 is installed','').': '.($pear_available ? lang('True') : lang('False'))."</span></div>\n"; 219 } 220 if ($pear_available && $package) 221 { 222 $available = @include($package.'.php'); 223 224 if (!class_exists($package)) $available = false; 225 226 echo '<div>'.($available ? $passed_icon : $warning_icon).' <span'.($available ? '' : ' class="setup_warning"').'>'. 227 lang('Checking PEAR%1 is installed','::'.$package).': '.($available ? lang('True') : lang('False'))."</span></div>\n"; 228 } 229 $available = $pear_available && (!$package || $available); 230 231 if (!$available) 232 { 233 echo $args['warning']; 234 } 235 echo "\n"; 236 237 return $available; 238 } 239 240 function extension_check($name,$args) 241 { 242 global $passed_icon, $error_icon, $warning_icon, $is_windows; 243 244 if (isset($args['win_only']) && $args['win_only'] && !$is_windows) 245 { 246 return True; // check only under windows 247 } 248 // we check for the existens of 'dl', as multithreaded webservers dont have it !!! 249 $available = extension_loaded($name) || function_exists('dl') && @dl(PHP_SHLIB_PREFIX.$name.'.'.PHP_SHLIB_SUFFIX); 250 251 echo '<div>'.($available ? $passed_icon : $warning_icon).' <span'.($available ? '' : ' class="setup_warning"').'>'.lang('Checking extension %1 is loaded or loadable',$name).': '.($available ? lang('True') : lang('False'))."</span></div>\n"; 252 253 if (!$available) 254 { 255 echo $args['warning']; 256 } 257 echo "\n"; 258 259 return $available; 260 } 261 262 function verbosePerms( $in_Perms ) 263 { 264 if($in_Perms & 0x1000) // FIFO pipe 265 { 266 $sP = 'p'; 267 } 268 elseif($in_Perms & 0x2000) // Character special 269 { 270 $sP = 'c'; 271 } 272 elseif($in_Perms & 0x4000) // Directory 273 { 274 $sP = 'd'; 275 } 276 elseif($in_Perms & 0x6000) // Block special 277 { 278 $sP = 'b'; 279 } 280 elseif($in_Perms & 0x8000) // Regular 281 { 282 $sP = '-'; 283 } 284 elseif($in_Perms & 0xA000) // Symbolic Link 285 { 286 $sP = 'l'; 287 } 288 elseif($in_Perms & 0xC000) // Socket 289 { 290 $sP = 's'; 291 } 292 else // UNKNOWN 293 { 294 $sP = 'u'; 295 } 296 297 // owner 298 $sP .= (($in_Perms & 0x0100) ? 'r' : '-') . 299 (($in_Perms & 0x0080) ? 'w' : '-') . 300 (($in_Perms & 0x0040) ? (($in_Perms & 0x0800) ? 's' : 'x' ) : 301 (($in_Perms & 0x0800) ? 'S' : '-')); 302 303 // group 304 $sP .= (($in_Perms & 0x0020) ? 'r' : '-') . 305 (($in_Perms & 0x0010) ? 'w' : '-') . 306 (($in_Perms & 0x0008) ? (($in_Perms & 0x0400) ? 's' : 'x' ) : 307 (($in_Perms & 0x0400) ? 'S' : '-')); 308 309 // world 310 $sP .= (($in_Perms & 0x0004) ? 'r' : '-') . 311 (($in_Perms & 0x0002) ? 'w' : '-') . 312 (($in_Perms & 0x0001) ? (($in_Perms & 0x0200) ? 't' : 'x' ) : 313 (($in_Perms & 0x0200) ? 'T' : '-')); 314 return $sP; 315 } 316 317 function permission_check($name,$args,$verbose=True) 318 { 319 global $passed_icon, $error_icon, $warning_icon,$is_windows; 320 //echo "<p>permision_check('$name',".print_r($args,True).",'$verbose')</p>\n"; 321 322 // add a ../ for non-absolute pathes 323 $rel_name = $name; 324 if (substr($name,0,3) != '../' && $name{0} != '/' && $name{0} != '\\' && strstr($name,':') === false) 325 { 326 $name = '../'.$name; 327 } 328 if (!file_exists($name) && isset($args['only_if_exists']) && $args['only_if_exists']) 329 { 330 return True; 331 } 332 333 $perms = $checks = ''; 334 if (file_exists($name)) 335 { 336 $owner = function_exists('posix_getpwuid') ? posix_getpwuid(@fileowner($name)) : array('name' => 'nn'); 337 $group = function_exists('posix_getgrgid') ? posix_getgrgid(@filegroup($name)) : array('name' => 'nn'); 338 $perms = "$owner[name]/$group[name] ".verbosePerms(@fileperms($name)); 339 } 340 341 $checks = array(); 342 if (isset($args['is_readable'])) 343 { 344 $checks[] = lang('readable by the webserver'); 345 $check_not = (!$args['is_readable']?lang('not'):''); 346 } 347 if (isset($args['is_writable'])) 348 { 349 $checks[] = lang('writable by the webserver'); 350 $check_not = (!$args['is_writable']?lang('not'):''); 351 } 352 if (isset($args['is_world_readable'])) 353 { 354 $checks[] = lang('world readable'); 355 $check_not = (!$args['is_world_readable']?lang('not'):''); 356 } 357 if (isset($args['is_world_writable'])) 358 { 359 $checks[] = lang('world writable'); 360 $check_not = (!$args['is_world_writable']?lang('not'):''); 361 } 362 $checks = implode(', ',$checks); 363 364 $icon = $passed_icon; 365 if (isset($args['msg']) && ($msg = $args['msg'])) 366 { 367 $msg .= ': '.$perms."<br />\n"; 368 } 369 else 370 { 371 $msg = lang('Checking file-permissions of %1 for %2 %3: %4',$rel_name,$check_not,$checks,$perms)."<br />\n"; 372 } 373 if (isset($args['error']) && $args['error']) 374 { 375 $extra_error_msg = "<br />\n".$args['error']; 376 } 377 if (!file_exists($name)) 378 { 379 echo '<div>'. $error_icon . '<span class="setup_error">' . $msg . lang('%1 does not exist !!!',$rel_name).$extra_error_msg."</span></div>\n"; 380 return False; 381 } 382 $warning = False; 383 if (!$GLOBALS['run_by_webserver'] && (@$args['is_readable'] || @$args['is_writable'])) 384 { 385 echo $warning_icon.' '.$msg. lang('Check can only be performed, if called via a webserver, as the user-id/-name of the webserver is not known.')."\n"; 386 unset($args['is_readable']); 387 unset($args['is_writable']); 388 $warning = True; 389 } 390 $Ok = True; 391 if (isset($args['is_writable']) && is_writable($name) != $args['is_writable']) 392 { 393 echo '<div>'.$error_icon.' <span class="setup_error">'.$msg.' '.lang('%1 is %2%3 !!!',$rel_name,$args['is_writable']?lang('not').' ':'',lang('writable by the webserver')).$extra_error_msg."</span></div>\n"; 394 $Ok = False; 395 } 396 if (isset($args['is_readable']) && is_readable($name) != $args['is_readable']) 397 { 398 echo '<div>'.$error_icon.' <span class="setup_error">'.$msg.' '.lang('%1 is %2%3 !!!',$rel_name,$args['is_readable']?lang('not').' ':'',lang('readable by the webserver')).$extra_error_msg."</span></div>\n"; 399 $Ok = False; 400 } 401 if (!$is_windows && isset($args['is_world_readable']) && !(fileperms($name) & 04) == $args['is_world_readable']) 402 { 403 echo '<div>'.$error_icon.' <span class="setup_error">'.$msg.' '.lang('%1 is %2%3 !!!',$rel_name,$args['is_world_readable']?lang('not').' ':'',lang('world readable')).$extra_error_msg."</span></div>\n"; 404 $Ok = False; 405 } 406 if (!$is_windows && isset($args['is_world_writable']) && !(fileperms($name) & 02) == $args['is_world_writable']) 407 { 408 echo '<div>'.$error_icon.' <span class="setup_error">'.$msg.' '.lang('%1 is %2%3 !!!',$rel_name,$args['is_world_writable']?lang('not').' ':'',lang('world writable')).$extra_error_msg."</span></div>\n"; 409 $Ok = False; 410 } 411 if ($Ok && !$warning && $verbose) 412 { 413 echo $passed_icon.' '.$msg; 414 } 415 if ($Ok && @$args['recursiv'] && is_dir($name)) 416 { 417 if ($verbose) 418 { 419 echo "<div class='setup_info'>" . lang('This might take a while, please wait ...')."</div>\n"; 420 flush(); 421 } 422 @set_time_limit(0); 423 $handle = @opendir($name); 424 while($handle && ($file = readdir($handle))) 425 { 426 if ($file != '.' && $file != '..') 427 { 428 $Ok = $Ok && permission_check(($name!='.'?$name.'/':'').$file,$args,False); 429 } 430 } 431 if ($handle) closedir($handle); 432 } 433 if ($verbose) echo "\n"; 434 435 return $Ok; 436 } 437 438 function mk_value($value) 439 { 440 if (!preg_match('/^([0-9]+)([mk]+)$/i',$value,$matches)) return $value; 441 442 return (strtolower($matches[2]) == 'm' ? 1024*1024 : 1024) * (int) $matches[1]; 443 } 444 445 function php_ini_check($name,$args) 446 { 447 global $passed_icon, $error_icon, $warning_icon, $is_windows; 448 449 $safe_mode = ini_get('safe_mode'); 450 451 $ini_value = ini_get($name); 452 $check = isset($args['check']) ? $args['check'] : '='; 453 $verbose_value = isset($args['verbose_value']) ? $args['verbose_value'] : $args['value']; 454 $ini_value_verbose = ''; 455 if ($verbose_value == 'On' || $verbose_value == 'Off') 456 { 457 $ini_value_verbose = ' = '.($ini_value ? 'On' : 'Off'); 458 } 459 switch ($check) 460 { 461 case 'not set': 462 $check = lang('not set'); 463 $result = !($ini_value & $args['value']); 464 break; 465 case 'set': 466 $check = lang('set'); 467 $result = !!($ini_value & $args['value']); 468 break; 469 case '>=': 470 $result = !$ini_value || // value not used, eg. no memory limit 471 (int) mk_value($ini_value) >= (int) mk_value($args['value']); 472 break; 473 case 'contain': 474 $check = lang('contain'); 475 $sep = $is_windows ? '[; ]+' : '[: ]+'; 476 $result = in_array($args['value'],split($sep,$ini_value)); 477 break; 478 case '=': 479 default: 480 $result = $ini_value == $args['value']; 481 break; 482 } 483 $msg = ' '.lang('Checking php.ini').": $name $check $verbose_value: <span class='setup_info'>ini_get('$name')='$ini_value'$ini_value_verbose</span>"; 484 485 if ($result) 486 { 487 echo "<div>".$passed_icon.$msg."</div>\n"; 488 } 489 if (!$result) 490 { 491 if (isset($args['warning'])) 492 { 493 echo "<div>".$warning_icon.' <span class="setup_warning">'.$msg.'</span><div class="setup_info">'.$args['warning']."</div></div>\n"; 494 } 495 if (isset($args['error'])) 496 { 497 echo "<div>".$error_icon.' <span class="setup_error">'.$msg.'</span><div class="setup_info">'.$args['error']."</div></div>\n"; 498 } 499 if (isset($args['safe_mode']) && $safe_mode || @$args['change']) 500 { 501 if (!isset($args['warning']) && !isset($args['error'])) 502 { 503 echo '<div>'.$error_icon.' <span class="setup_error">'.$msg.'</span></div>'; 504 } 505 echo "<div class='setup_error'>\n"; 506 echo '*** '.lang('Please make the following change in your php.ini').' ('.get_php_ini().'): '.(@$args['safe_mode']?$args['safe_mode']:$args['change'])."<br />\n"; 507 echo '*** '.lang('AND reload your webserver, so the above changes take effect !!!')."</div>\n"; 508 } 509 } 510 return $result; 511 } 512 513 function get_php_ini() 514 { 515 ob_start(); 516 phpinfo(INFO_GENERAL); 517 $phpinfo = ob_get_contents(); 518 ob_end_clean(); 519 520 return preg_match('/\(php.ini\).*<\/td><td[^>]*>([^ <]+)/',$phpinfo,$found) ? $found[1] : False; 521 } 522 523 function gd_check() 524 { 525 global $passed_icon, $warning_icon; 526 527 $available = (function_exists('imagecopyresampled') || function_exists('imagecopyresized')); 528 529 echo "<div>".($available ? $passed_icon : $warning_icon).' <span'.($available?'':' class="setup_warning"').'>'.lang('Checking for GD support...').': '.($available ? lang('True') : lang('False'))."</span></div>\n"; 530 531 if (!$available) 532 { 533 echo lang('Your PHP installation does not have appropriate GD support. You need gd library version 1.8 or newer to see Gantt charts in projects.')."\n"; 534 } 535 return $available; 536 } 537 538 if ($run_by_webserver) 539 { 540 $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup'); 541 $setup_tpl = CreateObject('setup.Template',$tpl_root); 542 $setup_tpl->set_file(array( 543 'T_head' => 'head.tpl', 544 'T_footer' => 'footer.tpl', 545 )); 546 $ConfigDomain = get_var('ConfigDomain',Array('POST','COOKIE')); 547 if (@$_GET['intro']) { 548 if($ConfigLang = get_var('ConfigLang',array('POST','COOKIE'))) 549 { 550 $GLOBALS['egw_setup']->set_cookie('ConfigLang',$ConfigLang,(int) (time()+(1200*9)),'/'); 551 } 552 $GLOBALS['egw_setup']->html->show_header(lang('Welcome to the eGroupWare Installation'),False,'config'); 553 echo '<h1>'.lang('Welcome to the eGroupWare Installation')."</h1>\n"; 554 if(!$ConfigLang) 555 { 556 echo '<p><form action="check_install.php?intro=1" method="Post">Please Select your language '.lang_select(True,'en')."</form></p>\n"; 557 } 558 echo '<p>'.lang('The first step in installing eGroupWare is to ensure your environment has the necessary settings to correctly run the application.').'</p>'; 559 echo '<p>'.lang('We will now run a series of tests, which may take a few minutes. Click the link below to proceed.').'</p>'; 560 echo '<h3><a href="check_install.php">'.lang('Run installation tests').'</a></h3>'; 561 echo '<p><a href="manageheader.php">'.lang('Skip the installation tests (not recommended)')."</a></p>\n"; 562 $setup_tpl->pparse('out','T_footer'); 563 exit; 564 } else { 565 $GLOBALS['egw_setup']->html->show_header(lang('Checking the eGroupWare Installation'),False,'config',$ConfigDomain ? $ConfigDomain . '(' . @$GLOBALS['egw_domain'][$ConfigDomain]['db_type'] . ')' : ''); 566 echo '<h1>'.lang('Checking the eGroupWare Installation')."</h1>\n"; 567 # echo "<pre style=\"text-align: left;\">\n";; 568 } 569 } 570 else 571 { 572 echo "Checking the eGroupWare Installation\n"; 573 echo "====================================\n\n"; 574 } 575 576 $Ok = True; 577 foreach ($checks as $name => $args) 578 { 579 $check_ok = $args['func']($name,$args); 580 $Ok = $Ok && $check_ok; 581 } 582 583 if ($run_by_webserver) 584 { 585 # echo "</pre>\n";; 586 587 if ($GLOBALS['egw_info']['setup']['stage']['header'] != 10) 588 { 589 if (!$Ok) 590 { 591 echo '<h3>'.lang('Please fix the above errors (%1) and warnings(%2)',$error_icon,$warning_icon)."</h3>\n"; 592 echo '<h3><a href="check_install.php">'.lang('Click here to re-run the installation tests')."</a></h3>\n"; 593 echo '<h3>'.lang('or %1Continue to the Header Admin%2','<a href="manageheader.php">','</a>')."</h3>\n"; 594 } 595 else 596 { 597 echo '<h3><a href="manageheader.php">'.lang('Continue to the Header Admin')."</a></h3>\n"; 598 } 599 } 600 else 601 { 602 echo '<h3>'; 603 if (!$Ok) 604 { 605 echo lang('Please fix the above errors (%1) and warnings(%2)',$error_icon,$warning_icon).'. '; 606 } 607 echo '<br /><a href="'.str_replace('check_install.php','',$_SERVER['HTTP_REFERER']).'">'.lang('Return to Setup')."</a></h3>\n"; 608 } 609 $setup_tpl->pparse('out','T_footer'); 610 //echo "</body>\n</html>\n"; 611 } 612 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |