Make WordPress Core

Changeset 18374


Ignore:
Timestamp:
06/29/2011 04:46:46 PM (13 years ago)
Author:
nacin
Message:

wp_check_php_mysql_versions() during setup and install. see #17934.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/setup-config.php

    r17622 r18374  
    4141
    4242require_once(ABSPATH . WPINC . '/load.php');
     43require_once(ABSPATH . WPINC . '/version.php');
     44wp_check_php_mysql_versions();
     45
    4346require_once(ABSPATH . WPINC . '/compat.php');
    4447require_once(ABSPATH . WPINC . '/functions.php');
    4548require_once(ABSPATH . WPINC . '/class-wp-error.php');
    46 require_once(ABSPATH . WPINC . '/version.php');
    4749
    4850if (!file_exists(ABSPATH . 'wp-config-sample.php'))
     
    5860if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php'))
    5961    wp_die("<p>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 <a href='install.php'>installing now</a>.</p>");
    60 
    61 if ( version_compare( $required_php_version, phpversion(), '>' ) )
    62     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 ) );
    63 
    64 if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') )
    65     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*/ );
    6662
    6763if (isset($_GET['step']))
  • trunk/wp-includes/load.php

    r18339 r18374  
    22/**
    33 * These functions are needed to load WordPress.
     4 *
     5 * This file must be parsable by PHP4.
    46 *
    57 * @package WordPress
     
    9597 *
    9698 * Dies if requirements are not met.
     99 *
     100 * This function must be able to work without a complete environment set up. In wp-load.php, for
     101 * example, WP_CONTENT_DIR is defined and version.php is included before this function is called.
    97102 *
    98103 * @access private
  • trunk/wp-load.php

    r17645 r18374  
    4242        $path = 'wp-admin/';
    4343
     44    require_once( ABSPATH . '/wp-includes/load.php' );
     45    require_once( ABSPATH . '/wp-includes/version.php' );
     46    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
     47    wp_check_php_mysql_versions();
     48
    4449    // Die with an error message
    4550    require_once( ABSPATH . '/wp-includes/class-wp-error.php' );
  • trunk/wp-settings.php

    r18346 r18374  
    2424wp_initial_constants( );
    2525
     26// Check for the required PHP version and for the MySQL extension or a database drop-in.
     27wp_check_php_mysql_versions();
     28
    2629// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
    2730set_magic_quotes_runtime( 0 );
     
    4043// Standardize $_SERVER variables across setups.
    4144wp_fix_server_vars();
    42 
    43 // Check for the required PHP version and for the MySQL extension or a database drop-in.
    44 wp_check_php_mysql_versions();
    4545
    4646// Check if we have received a request due to missing favicon.ico
Note: See TracChangeset for help on using the changeset viewer.