Index: wp-includes/update.php
===================================================================
--- wp-includes/update.php	(revision 12488)
+++ wp-includes/update.php	(working copy)
@@ -44,7 +44,7 @@
 	else
 		$mysql_version = 'N/A';
 	$local_package = isset( $wp_local_package )? $wp_local_package : '';
-	$url = "http://api.wordpress.org/core/version-check/1.3/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package";
+	$url = "http://api.wordpress.org/core/version-check/1.4/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package";
 
 	$options = array(
 		'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
@@ -74,6 +74,10 @@
 			$new_option->current = esc_attr( $returns[3] );
 		if ( isset( $returns[4] ) )
 			$new_option->locale = esc_attr( $returns[4] );
+		if ( isset( $returns[5] ) )
+			$new_option->php_version = esc_attr( $returns[5] );
+		if ( isset( $returns[6] ) )
+			$new_option->mysql_version = esc_attr( $returns[6] );
 		$new_options[] = $new_option;
 	}
 
Index: wp-admin/update-core.php
===================================================================
--- wp-admin/update-core.php	(revision 12497)
+++ wp-admin/update-core.php	(working copy)
@@ -13,7 +13,7 @@
 	wp_die(__('You do not have sufficient permissions to update plugins for this blog.'));
 
 function list_core_update( $update ) {
-	global $wp_local_package;
+	global $wp_local_package, $wpdb;
 	$version_string = ('en_US' == $update->locale && 'en_US' == get_locale() ) ?
 			$update->current : sprintf("%s&ndash;<strong>%s</strong>", $update->current, $update->locale);
 	$current = false;
@@ -21,6 +21,9 @@
 		$current = true;
 	$submit = __('Upgrade Automatically');
 	$form_action = 'update-core.php?action=do-core-upgrade';
+	$php_version    = phpversion();
+	$mysql_version  = $wpdb->db_version();
+	$show_buttons = true;
 	if ( 'development' == $update->response ) {
 		$message = __('You are using a development version of WordPress.  You can upgrade to the latest nightly build automatically or download the nightly build and install it manually:');
 		$download = __('Download nightly build');
@@ -30,7 +33,18 @@
 			$submit = __('Re-install Automatically');
 			$form_action = 'update-core.php?action=do-core-reinstall';
 		} else {
-			$message = 	sprintf(__('You can upgrade to version %s automatically or download the package and install it manually:'), $version_string);
+			$php_compat     = version_compare( $php_version, $update->php_version, '>=' );
+			$mysql_compat   = version_compare( $mysql_version, $update->mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
+			if ( !$mysql_compat && !$php_compat )
+				$message = sprintf( __('You cannot upgrade 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.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
+			elseif ( !$php_compat )
+				$message = sprintf( __('You cannot upgrade because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version );
+			elseif ( !$mysql_compat )
+				$message = sprintf( __('You cannot upgrade because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version );
+			else
+				$message = 	sprintf(__('You can upgrade to version %s automatically or download the package and install it manually:'), $version_string);
+			if ( !$mysql_compat || !$php_compat )
+				$show_buttons = false;
 		}
 		$download = sprintf(__('Download %s'), $version_string);
 	}
@@ -41,10 +55,12 @@
 	echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">';
 	wp_nonce_field('upgrade-core');
 	echo '<p>';
-	echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($submit) . '" name="upgrade" />&nbsp;';
 	echo '<input name="version" value="'. esc_attr($update->current) .'" type="hidden"/>';
 	echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>';
-	echo '<a href="' . esc_url($update->package) . '" class="button">' . $download . '</a>&nbsp;';
+	if ( $show_buttons ) {
+		echo '<input id="upgrade" class="button" type="submit" value="' . esc_attr($submit) . '" name="upgrade" />&nbsp;';
+		echo '<a href="' . esc_url($update->package) . '" class="button">' . $download . '</a>&nbsp;';
+	}
 	if ( 'en_US' != $update->locale )
 		if ( !isset( $update->dismissed ) || !$update->dismissed )
 			echo '<input id="dismiss" class="button" type="submit" value="' . esc_attr__('Hide this update') . '" name="dismiss" />';

