No PHP Support

It seems this server has no PHP support enabled. You will need to enable PHP before you can install and run DokuWiki. Contact your hosting provider if you're unsure what this means.
*/ use dokuwiki\PassHash; if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/'); if (!defined('DOKU_CONF')) define('DOKU_CONF', DOKU_INC . 'conf/'); if (!defined('DOKU_LOCAL')) define('DOKU_LOCAL', DOKU_INC . 'conf/'); // load and initialize the core system require_once(DOKU_INC . 'inc/init.php'); require_once(DOKU_INC . 'inc/pageutils.php'); // check for error reporting override or set error reporting to sane values if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); } else { error_reporting(DOKU_E_LEVEL); } // language strings require_once(DOKU_INC . 'inc/lang/en/lang.php'); if (isset($_REQUEST['l']) && !is_array($_REQUEST['l'])) { $LC = preg_replace('/[^a-z\-]+/', '', $_REQUEST['l']); } if (empty($LC)) $LC = 'en'; if ($LC && $LC != 'en') { require_once(DOKU_INC . 'inc/lang/' . $LC . '/lang.php'); } // initialise variables ... $error = []; // begin output header('Content-Type: text/html; charset=utf-8'); ?> <?php echo $lang['i_installer'] ?>


\n"; include(DOKU_INC . 'inc/lang/en/install.html'); echo "
\n"; } ?>
' . $lang['i_problems'] . '

'; print_errors(); print_retry(); } elseif (!check_configs()) { echo '

' . $lang['i_modified'] . '

'; print_errors(); } elseif (check_data($_REQUEST['d'])) { // check_data has sanitized all input parameters if (!store_data($_REQUEST['d'])) { echo '

' . $lang['i_failure'] . '

'; print_errors(); } else { echo '

' . $lang['i_success'] . '

'; } } else { print_errors(); print_form($_REQUEST['d']); } } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } ?>
driven by DokuWiki powered by PHP

$lang['i_license_none'], 'url' => '']; if (empty($d['license'])) $d['license'] = 'cc-by-sa'; foreach ($license as $key => $lic) { echo ''; } ?>

'', 'acl' => '1', 'superuser' => '', 'fullname' => '', 'email' => '', 'password' => '', 'confirm' => '', 'policy' => '0', 'allowreg' => '0', 'license' => 'cc-by-sa' ]; global $lang; global $error; if (!is_array($d)) $d = []; foreach ($d as $k => $v) { if (is_array($v)) unset($d[$k]); else $d[$k] = (string)$v; } //autolowercase the username $d['superuser'] = isset($d['superuser']) ? strtolower($d['superuser']) : ""; $ok = false; if (isset($_REQUEST['submit'])) { $ok = true; // check input if (empty($d['title'])) { $error[] = sprintf($lang['i_badval'], $lang['i_wikiname']); $ok = false; } if (isset($d['acl'])) { if (empty($d['superuser']) || ($d['superuser'] !== cleanID($d['superuser']))) { $error[] = sprintf($lang['i_badval'], $lang['i_superuser']); $ok = false; } if (empty($d['password'])) { $error[] = sprintf($lang['i_badval'], $lang['pass']); $ok = false; } elseif (!isset($d['confirm']) || $d['confirm'] != $d['password']) { $error[] = sprintf($lang['i_badval'], $lang['passchk']); $ok = false; } if (empty($d['fullname']) || strstr($d['fullname'], ':')) { $error[] = sprintf($lang['i_badval'], $lang['fullname']); $ok = false; } if (empty($d['email']) || strstr($d['email'], ':') || !strstr($d['email'], '@')) { $error[] = sprintf($lang['i_badval'], $lang['email']); $ok = false; } } else { // Since default = 1, browser won't send acl=0 when user untick acl $d['acl'] = '0'; } } $d = array_merge($form_default, $d); return $ok; } /** * Writes the data to the config files * * @param array $d * @return bool * @throws Exception * * @author Chris Smith */ function store_data($d) { global $LC; $ok = true; $d['policy'] = (int)$d['policy']; // create local.php $now = date('r'); $output = <<hash_bcrypt($d['password']); // create users.auth.php $output = << # Don't modify the lines above # # Userfile # # Auto-generated by install script # Date: $now # # Format: # login:passwordhash:Real Name:email:groups,comma,separated EOT; // --- user:bcryptpasswordhash:Real Name:email:groups,comma,seperated $output = $output . "\n" . implode(':', [ $d['superuser'], $pass, $d['fullname'], $d['email'], 'admin,user', ]) . "\n"; $ok = $ok && fileWrite(DOKU_LOCAL . 'users.auth.php', $output); // create acl.auth.php $output = << # Don't modify the lines above # # Access Control Lists # # Auto-generated by install script # Date: $now EOT; if ($d['policy'] == 2) { $output .= "* @ALL 0\n"; $output .= "* @user 8\n"; } elseif ($d['policy'] == 1) { $output .= "* @ALL 1\n"; $output .= "* @user 8\n"; } else { $output .= "* @ALL 8\n"; } $ok = $ok && fileWrite(DOKU_LOCAL . 'acl.auth.php', $output); } // enable popularity submission if (isset($d['pop']) && $d['pop']) { @touch(DOKU_INC . 'data/cache/autosubmit.txt'); } // disable auth plugins til needed $output = << */ function fileWrite($filename, $data) { global $error; global $lang; if (($fp = @fopen($filename, 'wb')) === false) { $filename = str_replace($_SERVER['DOCUMENT_ROOT'], '{DOCUMENT_ROOT}/', $filename); $error[] = sprintf($lang['i_writeerr'], $filename); return false; } if (!empty($data)) { fwrite($fp, $data); } fclose($fp); return true; } /** * check installation dependent local config files and tests for a known * unmodified main config file * * @return bool * * @author Chris Smith */ function check_configs() { global $error; global $lang; $ok = true; $config_files = [ 'local' => DOKU_LOCAL . 'local.php', 'users' => DOKU_LOCAL . 'users.auth.php', 'auth' => DOKU_LOCAL . 'acl.auth.php' ]; // configs shouldn't exist foreach ($config_files as $file) { if (file_exists($file) && filesize($file)) { $file = str_replace($_SERVER['DOCUMENT_ROOT'], '{DOCUMENT_ROOT}/', $file); $error[] = sprintf($lang['i_confexists'], $file); $ok = false; } } return $ok; } /** * Check other installation dir/file permission requirements * * @return bool * * @author Chris Smith */ function check_permissions() { global $error; global $lang; $dirs = [ 'conf' => DOKU_LOCAL, 'data' => DOKU_INC . 'data', 'pages' => DOKU_INC . 'data/pages', 'attic' => DOKU_INC . 'data/attic', 'media' => DOKU_INC . 'data/media', 'media_attic' => DOKU_INC . 'data/media_attic', 'media_meta' => DOKU_INC . 'data/media_meta', 'meta' => DOKU_INC . 'data/meta', 'cache' => DOKU_INC . 'data/cache', 'locks' => DOKU_INC . 'data/locks', 'index' => DOKU_INC . 'data/index', 'tmp' => DOKU_INC . 'data/tmp' ]; $ok = true; foreach ($dirs as $dir) { if (!file_exists("$dir/.") || !is_writable($dir)) { $dir = str_replace($_SERVER['DOCUMENT_ROOT'], '{DOCUMENT_ROOT}', $dir); $error[] = sprintf($lang['i_permfail'], $dir); $ok = false; } } return $ok; } /** * Check the availability of functions used in DokuWiki and the PHP version * * @return bool * * @author Andreas Gohr */ function check_functions() { global $error; global $lang; $ok = true; if (version_compare(phpversion(), '7.4.0', '<')) { $error[] = sprintf($lang['i_phpver'], phpversion(), '7.4.0'); $ok = false; } if (ini_get('mbstring.func_overload') != 0) { $error[] = $lang['i_mbfuncoverload']; $ok = false; } try { random_bytes(1); } catch (Exception $th) { // If an appropriate source of randomness cannot be found, an Exception will be thrown by PHP 7+ $error[] = $lang['i_urandom']; $ok = false; } if (ini_get('mbstring.func_overload') != 0) { $error[] = $lang['i_mbfuncoverload']; $ok = false; } $funcs = explode(' ', 'addslashes call_user_func chmod copy fgets ' . 'file file_exists fseek flush filesize ftell fopen ' . 'glob header ignore_user_abort ini_get mkdir ' . 'ob_start opendir parse_ini_file readfile realpath ' . 'rename rmdir serialize session_start unlink usleep ' . 'preg_replace file_get_contents htmlspecialchars_decode ' . 'spl_autoload_register stream_select fsockopen pack xml_parser_create'); if (!function_exists('mb_substr')) { $funcs[] = 'utf8_encode'; $funcs[] = 'utf8_decode'; } if (!function_exists('mail')) { if (strpos(ini_get('disable_functions'), 'mail') !== false) { $disabled = $lang['i_disabled']; } else { $disabled = ""; } $error[] = sprintf($lang['i_funcnmail'], $disabled); } foreach ($funcs as $func) { if (!function_exists($func)) { $error[] = sprintf($lang['i_funcna'], $func); $ok = false; } } return $ok; } /** * Print language selection * * @author Andreas Gohr */ function langsel() { global $lang; global $LC; $dir = DOKU_INC . 'inc/lang'; $dh = opendir($dir); if (!$dh) return; $langs = []; while (($file = readdir($dh)) !== false) { if (preg_match('/^[._]/', $file)) continue; if (is_dir($dir . '/' . $file) && file_exists($dir . '/' . $file . '/lang.php')) { $langs[] = $file; } } closedir($dh); sort($langs); echo '
'; echo $lang['i_chooselang']; echo ': '; echo ''; echo '
'; } /** * Print global error array * * @author Andreas Gohr */ function print_errors() { global $error; if (!empty($error)) { echo '
    '; foreach ($error as $err) { echo "
  • $err
  • "; } echo '
'; } }