From b1fae07c75ec3835b808f0f0d5eef4e41df231be Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 15 Sep 2019 12:17:33 +0200 Subject: [PATCH] invalidate opcache after writing header.inc.php if script is cached so changes take immediate affect in our default container installation with opcache.validate_timestamps=off --- setup/manageheader.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup/manageheader.php b/setup/manageheader.php index 2365254050..4fd18d5e04 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -126,6 +126,11 @@ else { fwrite($f,$newheader); fclose($f); + // invalidate OpCache so change have an effect, if scripts are cached and not checked for changes (as in our container installation) + if (function_exists('opcache_is_script_cached') && (opcache_is_script_cached($header= realpath('../header.inc.php')))) + { + opcache_invalidate($header, true); + } $GLOBALS['egw_setup']->html->show_header('Saved header.inc.php', False, 'header'); echo '
'; echo '
' . lang('Created header.inc.php!');