$webserverConfigFile = ''; if ($req->isIIS()) { $webserverConfigFile = 'web.config'; } else { $webserverConfigFile = '.htaccess'; } if ($req->hasErrors()) { $hasErrorOtherThanDatabase = true; $phpIniLocation = php_ini_loaded_file(); } if ($databaseConfig) { $dbReq = new InstallRequirements(); $dbReq->checkDatabase($databaseConfig); } if ($adminConfig) { $adminReq = new InstallRequirements(); $adminReq->checkAdminConfig($adminConfig); } // Actual processor $installFromCli = isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'install'; // CLI-install error message. exit(1) will halt any makefile. if ($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) { echo "Cannot install due to errors:\n"; $req->listErrors(); $dbReq->listErrors(); exit(1); } if ((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) { // Confirm before reinstalling if (!$installFromCli && $alreadyInstalled) { include FRAMEWORK_NAME . '/dev/install/config-form.html';
$civicrm_version['cms'] = 'WordPress'; // Ensure that they have downloaded the correct version of CiviCRM if ($civicrm_version['cms'] != 'WordPress') { $errorTitle = ts("Oops! Incorrect CiviCRM version"); $errorMsg = ts("This installer can only be used for the WordPress version of CiviCRM."); errorDisplayPage($errorTitle, $errorMsg); } } // Check requirements $req = new InstallRequirements(); $req->check(); if ($req->hasErrors()) { $hasErrorOtherThanDatabase = TRUE; } if ($databaseConfig) { $dbReq = new InstallRequirements(); $dbReq->checkdatabase($databaseConfig, 'CiviCRM'); if ($installType == 'drupal') { $dbReq->checkdatabase($drupalConfig, 'Drupal'); } } // Actual processor if (isset($_POST['go']) && !$req->hasErrors() && !$dbReq->hasErrors()) { // Confirm before reinstalling if (!isset($_POST['force_reinstall']) && $alreadyInstalled) { include $installDirPath . 'template.html'; } else { $inst = new Installer(); $inst->install($_POST); } // Show the config form
$silverstripe_version = $matches[1]; } } else { $silverstripe_version = "unknown"; } // Check requirements $req = new InstallRequirements(); $req->check(); if($req->hasErrors()) { $hasErrorOtherThanDatabase = true; } if($databaseConfig) { $dbReq = new InstallRequirements(); $dbReq->checkdatabase($databaseConfig); } // Actual processor $installFromCli = (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'install'); // CLI-install error message. exit(1) will halt any makefile. if($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) { echo "Cannot install due to errors:\n"; $req->listErrors(); $dbReq->listErrors(); exit(1); } if((isset($_REQUEST['go']) || $installFromCli) && !$req->hasErrors() && !$dbReq->hasErrors() && $adminConfig['username'] && $adminConfig['password']) {