Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.524
diff -u -p -r1.524 system.install
--- modules/system/system.install	13 Nov 2010 17:40:09 -0000	1.524
+++ modules/system/system.install	18 Nov 2010 06:56:05 -0000
@@ -474,6 +474,54 @@ function system_requirements($phase) {
     }
   }
 
+  // Check for Opcode cache settings that will break installation.
+  if ($phase == 'install') {
+    $opcode_required_settings = array();
+
+    // Zend Optimizer+.
+    if (ini_get('zend_optimizerplus.enable')) {
+      $opcode_name = 'Zend Optimizer+';
+      if (!ini_get('zend_optimizerplus.validate_timestamps') || ini_get('zend_optimizerplus.revalidate_freq') > 0) {
+        $opcode_required_settings = array(
+          'zend_optimizerplus.validate_timestamps' => TRUE,
+          'zend_optimizerplus.revalidate_freq' => 0,
+        );
+      }
+    }
+
+    // APC.
+    if (ini_get('apc.enabled')) {
+      $opcode_name = 'Alternative PHP Cache (APC)';
+      if (!ini_get('apc.stat') || ini_get('apc.ttl') > 0) {
+        $opcode_required_settings = array(
+          'apc.stat' => TRUE,
+          'apc.ttl' => 0,
+        );
+      }
+    }
+
+    // @todo Wincache.
+
+    // @todo eAccellerator.
+
+    // @todo If the code files are on a UNC Share (remote filesystem), the
+    // system will not receive notification of file changes regardless of the proper settings.
+
+    if ($opcode_required_settings) {
+      $description = $t('Your system is using @opcode_name for opcode caching.  It is configured in a way that will prevent Drupal from seeing the new files that it creates during installation.  For the duration of the installation it is recommended to use the following settings: ', array('@opcode_name' => $opcode_name));
+      $settings = "<br />\n";
+      foreach ($opcode_required_settings as $setting => $value) {
+        $settings .= "$setting = $value<br />\n";
+      }
+      $requirements['opcode'] = array(
+        'title' => $t('Opcode cache'),
+        'value' => $t('Configuration conflict'),
+        'severity' => REQUIREMENT_ERROR,
+        'description' => $description . "<em>$settings</em>",
+      );
+    }
+  }
+
   return $requirements;
 }
 
