Index: ../wp-includes/functions.php
===================================================================
--- ../wp-includes/functions.php	(revision 6313)
+++ ../wp-includes/functions.php	(working copy)
@@ -1484,4 +1484,45 @@
 	return abs( intval( $maybeint ) );
 }
 
-?>
\ No newline at end of file
+function wp_checkmem() {
+	$memory_limit = ini_get("memory_limit");
+	$memory_limit_bytes = trim($memory_limit);
+	$last = strtolower($memory_limit_bytes{strlen($memory_limit_bytes)-1});
+	switch($last) {
+	        // The 'G' modifier is available since PHP 5.1.0
+        	case 'g':
+			$memory_limit_bytes *= 1024;
+		case 'm':
+		   	$memory_limit_bytes *= 1024;
+		case 'k':
+			$memory_limit_bytes *= 1024;
+	}
+	if($memory_limit_bytes < 8388608) {
+		return ("Warning: Memory limit is $memory_limit. The minimum recommended is 8M.<br/>");
+	}
+}
+
+function wp_checkfunctions () {
+	$functions = array(
+				"dir" => __("WordPress will not be able to list the contents of directories."),
+				"fopen" => __("We may have to use CURL instead of fopen when checking remote resources."),
+				"curl_init" => __("We may have to use fopen instead of CURL when checking remote resources.")
+			);
+	foreach($functions as $f=>$r) {
+		if(!function_exists($f)){
+			$t .= __("Warning: $f() has been disabled. $r<br/>");
+		}
+	}
+	return $t;
+}	
+
+function wp_preflightchecks() {
+	$t =  wp_checkmem();
+	$t .=  wp_checkfunctions();
+	if ($t <> "") {
+		echo "<h1>". __('Pre-flight checks') ."</h1>";
+		_e('To resolve these issues you may need to adjust your PHP environment. Please contact your system administrator if necessary.');
+		echo "<div class='preflightchecks'>$t</div>";
+	}
+}
+?>
