public static function get_advises(HTMLForm $html_form)
 {
     $lang = LangLoader::get('admin-server-common');
     $server_configuration = new ServerConfiguration();
     $maintenance_config = MaintenanceConfig::load();
     $general_config = GeneralConfig::load();
     $server_environment_config = ServerEnvironmentConfig::load();
     $security_config = SecurityConfig::load();
     $url_rewriting_available = false;
     try {
         $url_rewriting_available = $server_configuration->has_url_rewriting();
     } catch (UnsupportedOperationException $ex) {
     }
     $fieldset = new FormFieldsetHTML('advises', $lang['advises']);
     $fieldset->add_field(new FormFieldFree('modules_management', '', MessageHelper::display($lang['advises.modules_management'], MessageHelper::SUCCESS)->render()));
     if ($maintenance_config->is_under_maintenance()) {
         $fieldset->add_field(new FormFieldFree('check_modules_authorizations', '', MessageHelper::display($lang['advises.check_modules_authorizations'], MessageHelper::SUCCESS)->render()));
     }
     if (!strstr($general_config->get_site_url(), 'localhost') && !strstr($general_config->get_site_url(), '127.0.0.1') && !$maintenance_config->is_under_maintenance() && Debug::is_debug_mode_enabled()) {
         $fieldset->add_field(new FormFieldFree('disable_debug_mode', '', MessageHelper::display($lang['advises.disable_debug_mode'], MessageHelper::WARNING)->render()));
     }
     if ($url_rewriting_available && !$server_environment_config->is_url_rewriting_enabled()) {
         $fieldset->add_field(new FormFieldFree('enable_url_rewriting', '', MessageHelper::display($lang['advises.enable_url_rewriting'], MessageHelper::NOTICE)->render()));
     }
     if (function_exists('ob_gzhandler') && @extension_loaded('zlib') && !$server_environment_config->is_output_gziping_enabled()) {
         $fieldset->add_field(new FormFieldFree('enable_output_gz', '', MessageHelper::display($lang['advises.enable_output_gz'], MessageHelper::NOTICE)->render()));
     }
     if (DataStoreFactory::is_apc_available() && !DataStoreFactory::is_apc_enabled()) {
         $fieldset->add_field(new FormFieldFree('enable_apcu_cache', '', MessageHelper::display($lang['advises.enable_apcu_cache'], MessageHelper::NOTICE)->render()));
     }
     $fieldset->add_field(new FormFieldFree('save_database', '', MessageHelper::display($lang['advises.save_database'], MessageHelper::SUCCESS)->render()));
     if (!DatabaseConfig::load()->is_database_tables_optimization_enabled()) {
         $fieldset->add_field(new FormFieldFree('optimize_database_tables', '', MessageHelper::display($lang['advises.optimize_database_tables'], MessageHelper::SUCCESS)->render()));
     }
     if ($security_config->get_internal_password_min_length() == 6 && $security_config->get_internal_password_strength() == SecurityConfig::PASSWORD_STRENGTH_WEAK && !$security_config->are_login_and_email_forbidden_in_password()) {
         $fieldset->add_field(new FormFieldFree('password_security', '', MessageHelper::display($lang['advises.password_security'], MessageHelper::NOTICE)->render()));
     }
     if (ServerConfiguration::get_phpversion() < '5.6') {
         $fieldset->add_field(new FormFieldFree('upgrade_php_version', '', MessageHelper::display($lang['advises.upgrade_php_version'], MessageHelper::NOTICE)->render()));
     }
     if (count($fieldset->get_fields())) {
         $html_form->add_fieldset($fieldset);
     }
 }
 public function save_server_environnement_config()
 {
     $server_configuration = new ServerConfiguration();
     $server_environment_config = ServerEnvironmentConfig::load();
     try {
         if ($server_configuration->has_url_rewriting()) {
             $server_environment_config->set_url_rewriting_enabled(true);
         }
     } catch (UnsupportedOperationException $ex) {
         $server_environment_config->set_url_rewriting_enabled(false);
     }
     if (function_exists('ob_gzhandler') && @extension_loaded('zlib')) {
         $server_environment_config->set_output_gziping_enabled(true);
     }
     if (DataStoreFactory::is_apc_available()) {
         DataStoreFactory::set_apc_enabled(true);
     }
     ServerEnvironmentConfig::save();
 }
 private function is_apc_available()
 {
     return DataStoreFactory::is_apc_available();
 }