wp_check_php_mysql_versions() during setup and install. see #17934.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6a36b65f01
commit
ad1e1df0f2
|
@ -40,10 +40,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 . '/class-wp-error.php');
|
||||
require_once(ABSPATH . WPINC . '/version.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 +60,6 @@ if (file_exists(ABSPATH . 'wp-config.php'))
|
|||
if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php'))
|
||||
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>");
|
||||
|
||||
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
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
/**
|
||||
* These functions are needed to load WordPress.
|
||||
*
|
||||
* This file must be parsable by PHP4.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
|
@ -95,6 +97,9 @@ function wp_fix_server_vars() {
|
|||
*
|
||||
* Dies if requirements are not met.
|
||||
*
|
||||
* This function must be able to work without a complete environment set up. In wp-load.php, for
|
||||
* example, WP_CONTENT_DIR is defined and version.php is included before this function is called.
|
||||
*
|
||||
* @access private
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
|
|
@ -41,6 +41,11 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) {
|
|||
else
|
||||
$path = 'wp-admin/';
|
||||
|
||||
require_once( ABSPATH . '/wp-includes/load.php' );
|
||||
require_once( ABSPATH . '/wp-includes/version.php' );
|
||||
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
||||
wp_check_php_mysql_versions();
|
||||
|
||||
// Die with an error message
|
||||
require_once( ABSPATH . '/wp-includes/class-wp-error.php' );
|
||||
require_once( ABSPATH . '/wp-includes/functions.php' );
|
||||
|
|
|
@ -23,6 +23,9 @@ require( ABSPATH . WPINC . '/version.php' );
|
|||
// Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, WP_CONTENT_DIR and WP_CACHE.
|
||||
wp_initial_constants( );
|
||||
|
||||
// Check for the required PHP version and for the MySQL extension or a database drop-in.
|
||||
wp_check_php_mysql_versions();
|
||||
|
||||
// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
|
||||
set_magic_quotes_runtime( 0 );
|
||||
@ini_set( 'magic_quotes_sybase', 0 );
|
||||
|
@ -40,9 +43,6 @@ unset( $wp_filter, $cache_lastcommentmodified );
|
|||
// Standardize $_SERVER variables across setups.
|
||||
wp_fix_server_vars();
|
||||
|
||||
// Check for the required PHP version and for the MySQL extension or a database drop-in.
|
||||
wp_check_php_mysql_versions();
|
||||
|
||||
// Check if we have received a request due to missing favicon.ico
|
||||
wp_favicon_request();
|
||||
|
||||
|
|
Loading…
Reference in New Issue