diff -r 5e1f1e916419 -r 98bbc533541c punbb/install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/install.php Sun Apr 06 00:28:50 2008 -0400 @@ -0,0 +1,1673 @@ +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('This PHP environment does not have support for any of the databases that PunBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for PunBB to be installed.'); + +?> + + + +
+ +Enter your announcement here.
'", + 'o_rules' => "'0'", + 'o_rules_message' => "'Enter your rules here.'", + 'o_maintenance' => "'0'", + 'o_maintenance_message' => "'The forums are temporarily down for maintenance. Please try again in a few minutes.'.$lang_install['Go to index'].'') ?>
+'.$lang_install['Go to index'].'') ?>
+