summaryrefslogtreecommitdiff
path: root/includes/install.inc
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-30 00:46:00 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-30 00:46:00 -0400
commitbe97f50fba4c7c87b4332d30cf8e0f612b89bdb5 (patch)
treea25676e1073a0dafaa3abc0534b77c42b49dab74 /includes/install.inc
parentea48131869663312ab598d281197bc96bc8c1ac7 (diff)
downloadbrdo-be97f50fba4c7c87b4332d30cf8e0f612b89bdb5.tar.gz
brdo-be97f50fba4c7c87b4332d30cf8e0f612b89bdb5.tar.bz2
Issue #779482 by mikeytown2, sun, dalin, cam8001, segi, alexpott, Boobaa, Sweetchuck, jbrown, quicksketch: Installation failure when opcode cache is enabled
Diffstat (limited to 'includes/install.inc')
-rw-r--r--includes/install.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/install.inc b/includes/install.inc
index f13ee8ac2..2b55589f8 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -653,6 +653,13 @@ function drupal_rewrite_settings($settings = array(), $prefix = '') {
if ($fp && fwrite($fp, $buffer) === FALSE) {
throw new Exception(st('Failed to modify %settings. Verify the file permissions.', array('%settings' => $settings_file)));
}
+ else {
+ // The existing settings.php file might have been included already. In
+ // case an opcode cache is enabled, the rewritten contents of the file
+ // will not be reflected in this process. Ensure to invalidate the file
+ // in case an opcode cache is enabled.
+ drupal_clear_opcode_cache(DRUPAL_ROOT . '/' . $settings_file);
+ }
}
else {
throw new Exception(st('Failed to open %settings. Verify the file permissions.', array('%settings' => $default_settings)));