function display_serverinfo() { get_generalinfo(); get_phpinfo(); get_mysqlinfo(); get_memcachedinfo(); }
do_error("Unable to connect to database"); } if (!check_iconv()->getOK()) { do_error("The 'iconv' extension for PHP is not available"); } function get_phpinfo() { ob_start(); phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); $phpinfo = preg_replace('{^.*?<body>}s', '', $phpinfo); $phpinfo = preg_replace('{</body>.*?$}s', '', $phpinfo); return $phpinfo; } $phpinfo = get_phpinfo(); try { include "./always.php"; set_error_handler('log_setup_error', E_ALL); include "DAViCalSession.php"; if (check_pgsql()->GetOK()) { $session->LoginRequired(isset($c->restrict_setup_to_admin) && $c->restrict_setup_to_admin ? 'Admin' : null); } } catch (Exception $e) { class FakeSession { function AllowedTo() { return true; } }
if (substr(PHP_OS, 0, 3) == 'WIN') { define('PATH_SEPARATOR', ';'); } else { define('PATH_SEPARATOR', ':'); } } ini_set('include_path', $script_root . 'inc' . PATH_SEPARATOR . $script_root . 'inc/lib' . PATH_SEPARATOR . $script_root . 'languages' . PATH_SEPARATOR); include 'functions.inc.php'; include 'template.class.inc.php'; include 'log_downloads.class.inc.php'; include 'language.' . $language . '.inc.php'; /***************************************************** ** Get server info *****************************************************/ if ($debug_mode == 'on') { get_phpinfo(array('Script Name' => $script_name, 'Script Version' => $script_version)); } /***************************************************** ** Load template *****************************************************/ $tpl = new template(); $tpl->load_file('dlcl', $template_file); /***************************************************** ** Take care for older PHP-Versions *****************************************************/ if (isset($HTTP_GET_VARS) and !empty($HTTP_GET_VARS)) { $_GET = $HTTP_GET_VARS; } if (isset($HTTP_POST_VARS) and !empty($HTTP_POST_VARS)) { $_POST = $HTTP_POST_VARS; }
/***************************************************** ** Include config file *****************************************************/ $vote = @file($script_root . 'inc/config.dat.php'); /***************************************************** ** Load language file *****************************************************/ if (!isset($language) or empty($language) or !is_file($script_root . './languages/language.' . $language . '.inc.php')) { $language = 'en'; } include $script_root . 'languages/language.' . $language . '.inc.php'; /***************************************************** ** Show server info for admin *****************************************************/ if ($debug_mode == 'on') { get_phpinfo(array('Script Name' => $add_text['txt_script_name'], 'Script Version' => $script_version)); } /***************************************************** ** Check template path *****************************************************/ if (!is_dir($path['templates'])) { $system_message[] = array('message' => $txt['txt_wrong_template_path']); } /***************************************************** ** Check templates *****************************************************/ if (!isset($system_message)) { while (list($key, $val) = each($tmpl)) { if (!is_file($path['templates'] . $tmpl[$key])) { $wrong_template[] = $val; }
break; default: break; } } else { $sql = $db->get_versions(); echo '<table width="500"> <tr><td class="infohead">Setting</td><td class="infohead">Value</td></tr> <tr><td>CMS Version</td><td>' . CPG_NUKE . '</td></tr> <tr><td>PHP Version</td><td>' . phpversion() . '</td></tr> <tr><td>' . $sql['engine'] . ' Version</td><td>' . $sql['server'] . ' (client: ' . $sql['client'] . ')</td></tr> '; if (extension_loaded('gd') && function_exists('gd_info')) { $gd = gd_info(); echo ' <tr><td>GD Version</td><td>' . $gd['GD Version'] . '</td></tr>'; } echo ' <tr><td>CMS path</td><td>' . BASEDIR . '</td></tr> <tr><td>Core path</td><td>' . CORE_PATH . '</td></tr> <tr><td>Session save_path</td><td>' . session_save_path() . '</td></tr> <tr><td>Process Owner</td><td>' . _PROCESS_OWNER . ' (' . _PROCESS_UID . ')</td></tr> <tr><td>File Owner</td><td>' . _DRAGONLY_OWNER . ' (' . getmyuid() . ')</td></tr> <tr><td>Group</td><td>' . getmygid() . '</td></tr> ' . get_phpinfo(INFO_GENERAL) . ' </table>'; } } } } } CloseTable();