X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/bf5c68485ef07868ad0a91168ecd0092af7661ae..8f374b7233bc2815ccc387e448d208c5434eb961:/wp-admin/install.php?ds=sidebyside diff --git a/wp-admin/install.php b/wp-admin/install.php index edbc8c01..e39d1f4f 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -10,13 +10,13 @@ if ( false ) { ?> - + Error: PHP is not running -

WordPress

+

WordPress

Error: PHP is not running

WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

@@ -41,7 +41,7 @@ require_once( dirname( __FILE__ ) . '/includes/upgrade.php' ); /** Load wpdb */ require_once(dirname(dirname(__FILE__)) . '/wp-includes/wp-db.php'); -$step = isset( $_GET['step'] ) ? $_GET['step'] : 0; +$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; /** * Display install header. @@ -61,7 +61,7 @@ function display_header() { > -

WordPress

+

WordPress

- +

@@ -151,15 +151,20 @@ $php_compat = version_compare( $php_version, $required_php_version, '>=' ); $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); if ( !$mysql_compat && !$php_compat ) - $compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ); elseif ( !$php_compat ) - $compat = sprintf( __('You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ); + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version ); elseif ( !$mysql_compat ) - $compat = sprintf( __('You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ); + $compat = sprintf( __( 'You cannot install because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); if ( !$mysql_compat || !$php_compat ) { display_header(); - die('

' . __('Insufficient Requirements') . '

' . $compat . '

'); + die( '

' . __( 'Insufficient Requirements' ) . '

' . $compat . '

' ); +} + +if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { + display_header(); + die( '

' . __( 'Configuration Error' ) . '

' . __( 'Your wp-config.php file has an empty database table prefix, which is not supported.' ) . '

' ); } switch($step) { @@ -167,7 +172,7 @@ switch($step) { case 1: // Step 1, direct link. display_header(); ?> -

+

ReadMe documentation at your leisure. Otherwise, just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ), '../readme.html' ); ?>

@@ -207,7 +212,7 @@ switch($step) { $error = true; } elseif ( ! is_email( $admin_email ) ) { // TODO: poka-yoke - display_setup_form( __( 'that isn’t a valid e-mail address. E-mail addresses look like: username@example.com' ) ); + display_setup_form( __( 'that isn’t a valid e-mail address. E-mail addresses look like: username@example.com' ) ); $error = true; }