diff --git a/core/install.php b/core/install.php
index 1b921d6..f8d0fca 100644
--- a/core/install.php
+++ b/core/install.php
@@ -26,6 +26,12 @@
   exit;
 }
 
+// Exit early if the PHP option safe_mode is enabled to avoid fatal errors.
+if (ini_get('safe_mode')) {
+  print 'Your PHP installation has safe_mode enabled. Drupal requires the safe_mode option to be turned off. See the <a href="http://drupal.org/requirements">system requirements</a> page for more information.';
+  exit;
+}
+
 // Start the installer.
 require_once __DIR__ . '/includes/install.core.inc';
 install_drupal();
