['condition' => isExtensionInstalled('curl')], 'php-mysql' => ['condition' => isExtensionInstalled('mysqli')], 'php-mbstring' => ['condition' => isExtensionInstalled('mbstring')], 'php-xml' => ['condition' => isExtensionInstalled('xml')], 'php-zip' => ['condition' => isExtensionInstalled('zip')], ]; // MariaDB / MySQL $mariadb_version = 10.1; $mysql_version = 5.7; // ######################################################### // Gettext Implementation // ######################################################### // include the lib and the conf file require_once('includes/gettext/gettext.php'); require_once('includes/gettext/gettext_conf.php'); /** * save all available languages * @var array $languages */ $languages = $gt_conf['languages']; // if we come with a get call we can switch the language cookie if (isset($_GET['lang'])) { switch_lang($_GET['lang']); } // get the browsers language if no cookie exists and set one if (!isset($_COOKIE[$gt_conf['lang_cookie']])) { $browser_language = _get_client_language(); setcookie($gt_conf['lang_cookie'], $browser_language['gettext']); header("Location: " . $installer_url); exit(); } // get the language from the cookie $language = $_COOKIE[$gt_conf['lang_cookie']]; // and set the locale for gettext T_setlocale(LC_MESSAGES, $language); // function to switch the language based on the user selection function switch_lang($new_language) { global $gt_conf, $installer_url; setcookie($gt_conf['lang_cookie'], $new_language); header("Location: " . $installer_url); exit(); } // ######################################################### END OF PRECONFIGURATION // Function to check if a PHP extension is installed function isExtensionInstalled($extensionName) { return in_array($extensionName, get_loaded_extensions()); } function delDir($dir) { $files = glob($dir . '*', GLOB_MARK); foreach ($files as $file) { if (substr($file, -1) == '/') { if (file_exists($file)) { delDir($file); } } else { if (file_exists($file)) { unlink($file); } } } } if (file_exists($db_file_path)) { delDir(getcwd()); header("../"); exit; } if (file_exists($root_mode_file)) { $root_mode = true; } else { $root_mode = false; } // Only load the classes in case the user submitted the form if ($_POST) { // Load the classes and create the new objects require_once('includes/core_class.php'); require_once('includes/database_class.php'); $core = new Core(); $database = new Database(); if ($_POST['database_check'] ?? false == true) { $result = $database->database_check($_POST); echo $result; exit; } else { // Validate the post data if ($core->validate_post($_POST) == true) { // First create the database, then create tables, then write config file if ($database->create_database($_POST) == false) { $message = $core->show_message('error', "The database could not be created, please verify your settings."); } elseif ($database->create_tables($_POST) == false) { $message = $core->show_message('error', "The database tables could not be created, please verify your settings."); } elseif ($core->write_config($_POST) == false) { $message = $core->show_message('error', "The database configuration file could not be written, please chmod " . $db_config_path . "/database.php file to 777"); } if ($core->write_configfile($_POST) == false) { $message = $core->show_message('error', "The config configuration file could not be written, please chmod " . $db_config_path . "/config.php file to 777"); } // If no errors, redirect to registration page if (!isset($message)) { sleep(1); $ch = curl_init(); list($realHost,) = explode(':', $_SERVER['HTTP_HOST']); $wavelog_url = $http_scheme . "://" . $realHost . ":" . $_SERVER['SERVER_PORT']; curl_setopt($ch, CURLOPT_URL, $wavelog_url); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_setopt($ch, CURLOPT_URL, $wavelog_url . "/index.php/update/dxcc"); $result = curl_exec($ch); delDir(getcwd()); header('Location: ' . $http_scheme . "://" . $_SERVER['HTTP_HOST'] . '/' . $_POST['directory']); exit; } } else { $message = $core->show_message('error', 'Not all fields have been filled in correctly. The host, username, password, and database name are required.'); } } } global $wavelog_url; ?> <?= __("Install | Wavelog"); ?> ' . $message . '

'; // TODO Integrate Message into the design, Dialog??? } ?>

Wavelog is a powerful web-based amateur radio logging software. Follow the steps in each tab to configure and install Wavelog on your server."); ?>

" . __("Wiki") . "", "" . __("Discussions") . ""); ?>

$moduleData) { $condition = $moduleData['condition']; if (!$condition) { $allChecksPassed = 'failed'; } ?>

max_execution_time ' . $max_execution_time . ' s'; ?> = $max_execution_time) { ?>
max_upload_file_size ' . $max_upload_file_size . 'M'; ?> = ($max_upload_file_size * 1024 * 1024)) { // compare with given value in bytes ?>
post_max_size ' . $post_max_size . 'M'; ?> = ($post_max_size * 1024 * 1024)) { // compare with given value in bytes ?>
allow_url_fopen On

" class="form-control" name="directory" aria-describedby="main-url" />
" class="form-control" name="websiteurl" />
" class="form-control" name="callbook_username" />
" class="form-control" name="callbook_password" />

Make sure you use a safe password."); ?>

Example:

chmod -R 777 %s

Don't forget to restore the permissions afterwards."), $db_config_path, $db_config_path); ?>