here instead.'); // Make sure we are running at least MIN_PHP_VERSION if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) exit('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP '.MIN_PHP_VERSION.' to run properly. You must upgrade your PHP installation before you can continue.'); // Disable error reporting for uninitialized variables error_reporting(E_ALL); // Turn off PHP time limit @set_time_limit(0); // We need some stuff from functions.php require PUN_ROOT.'include/functions.php'; // Load the language file require PUN_ROOT.'lang/English/install.php'; if (isset($_POST['generate_config'])) { header('Content-Type: text/x-delimtext; name="config.php"'); header('Content-disposition: attachment; filename=config.php'); $db_type = $_POST['db_type']; $db_host = $_POST['db_host']; $db_name = $_POST['db_name']; $db_username = $_POST['db_username']; $db_password = $_POST['db_password']; $db_prefix = $_POST['db_prefix']; $base_url = $_POST['base_url']; $cookie_name = $_POST['cookie_name']; echo get_config_file(); exit; } if (!isset($_POST['form_sent'])) { // Determine available database extensions $dual_mysql = false; $db_extensions = array(); if (function_exists('mysqli_connect')) $db_extensions[] = array('mysqli', 'MySQL Improved'); if (function_exists('mysql_connect')) { $db_extensions[] = array('mysql', 'MySQL Standard'); if (count($db_extensions) > 1) $dual_mysql = true; } if (function_exists('sqlite_open')) $db_extensions[] = array('sqlite', 'SQLite'); if (function_exists('pg_connect')) $db_extensions[] = array('pgsql', 'PostgreSQL'); if (empty($db_extensions)) error($lang_install['No database support']); // Make an educated guess regarding base_url $base_url_guess = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://').preg_replace('/:80$/', '', $_SERVER['HTTP_HOST']).str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])); if (substr($base_url_guess, -1) == '/') $base_url_guess = substr($base_url_guess, 0, -1); ?>
'.$lang_install['Go to index'].'') ?>
'.$lang_install['Go to index'].'') ?>