Esempio n. 1
0
} else {
    GWF3::onLoadConfig(GWF_CONFIG_PATH);
}
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallWizard.php';
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallFunctions.php';
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallConfig.php';
require_once GWF_CORE_PATH . 'inc/install/GWF_InstallWizardLanguage.php';
GWF_InstallWizardLanguage::init();
GWF_Log::init(false, true, GWF_PATH . '/protected/installlog');
$lang = new GWF_LangTrans(GWF_CORE_PATH . 'lang/install/install');
if (isset($write_a_config)) {
    GWF_InstallConfig::writeConfig($lang);
    echo 'I have written a default config to protected/config.php' . PHP_EOL;
    echo 'Please edit that config.php, before installing gwf3.' . PHP_EOL;
    die(0);
}
if (false === gdo_db()) {
    file_put_contents('php://stderr', 'Cannot connect to the database. Check your protected/config.php!' . PHP_EOL);
    die(1);
}
echo "Installing gwf util core..." . PHP_EOL;
if (!GWF_InstallFunctions::core(false)) {
    file_put_contents('php://stderr', 'Cannot install core... giving up!');
    die(2);
}
echo "Installing Language,Country,IP2Country..." . PHP_EOL;
GWF_InstallFunctions::createLanguage(true, true, false);
echo "Installing all modules..." . PHP_EOL;
echo GWF_InstallFunctions::all_modules(false);
echo "Thank you for trying GWF!" . PHP_EOL;
die(0);
Esempio n. 2
0
 /**
  * Install core on the fly ...
  */
 public static function wizard_3()
 {
     $back = self::wizard_h2('3');
     if (false !== ($error = self::wizard_check_cfg_quick())) {
         return $error;
     }
     $back .= self::$gwfil->lang('step_3_0') . PHP_EOL;
     $success = true;
     if (false === ($core = GWF_InstallFunctions::core(false, $success))) {
         return $core . GWF_HTML::err('ERR_DATABASE', __FILE__, __LINE__, true, true);
     } else {
         $back .= $core;
     }
     if ($success) {
         $back .= self::wizard_btn('4');
     }
     return $back;
 }