X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..refs/tags/wordpress-3.3.1-scripts:/wp-admin/setup-config.php?ds=sidebyside diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 6089a23b..efc158fc 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -5,6 +5,8 @@ * The permissions for the base directory must allow for writing files in order * for the wp-config.php to be created using this page. * + * @internal This file must be parsable by PHP4. + * * @package WordPress * @subpackage Administration */ @@ -40,10 +42,12 @@ define('WP_DEBUG', false); /**#@-*/ require_once(ABSPATH . WPINC . '/load.php'); +require_once(ABSPATH . WPINC . '/version.php'); +wp_check_php_mysql_versions(); + require_once(ABSPATH . WPINC . '/compat.php'); require_once(ABSPATH . WPINC . '/functions.php'); -require_once(ABSPATH . WPINC . '/classes.php'); -require_once(ABSPATH . WPINC . '/version.php'); +require_once(ABSPATH . WPINC . '/class-wp-error.php'); if (!file_exists(ABSPATH . 'wp-config-sample.php')) wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.'); @@ -58,12 +62,6 @@ if (file_exists(ABSPATH . 'wp-config.php')) if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) wp_die("

The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

"); -if ( version_compare( $required_php_version, phpversion(), '>' ) ) - wp_die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress requires at least %2$s.'/*/WP_I18N_OLD_PHP*/, phpversion(), $required_php_version ) ); - -if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') ) - wp_die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); - if (isset($_GET['step'])) $step = $_GET['step']; else @@ -80,7 +78,7 @@ else function display_header() { header( 'Content-Type: text/html; charset=utf-8' ); ?> - + @@ -132,7 +130,7 @@ switch($step) { - ...and MySQL password. + ...and your MySQL password. @@ -141,7 +139,7 @@ switch($step) { - + If you want to run multiple WordPress installations in a single database, change this. @@ -176,8 +174,10 @@ switch($step) { // We'll fail here if the values are no good. require_wp_db(); - if ( !empty($wpdb->error) ) - wp_die($wpdb->error->get_error_message()); + if ( ! empty( $wpdb->error ) ) { + $back = '

Try Again

'; + wp_die( $wpdb->error->get_error_message() . $back ); + } // Fetch or generate keys and salts. $no_api = isset( $_POST['noapi'] );