WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/wp-admin/install.php

    r11930 r12578  
    8383if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');}
    8484
     85$php_version    = phpversion();
     86$mysql_version  = $wpdb->db_version();
     87$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
     88$mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
     89
     90if ( !$mysql_compat && !$php_compat )
     91    $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 );
     92elseif ( !$php_compat )
     93    $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 );
     94elseif ( !$mysql_compat )
     95    $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 );
     96
     97if ( !$mysql_compat || !$php_compat ) {
     98    display_header();
     99    die('<h1>' . __('Insufficient Requirements') . '</h1><p>' . $compat . '</p></body></html>');
     100}
     101
    85102switch($step) {
    86103    case 0:
Note: See TracChangeset for help on using the changeset viewer.