From f1a81380554070d7f4b0c6dcd1202364ebf3d252 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 13 Jun 2019 12:51:35 +0200 Subject: [PATCH] Fixed bug #78106 When disabling opcache during the request via opcache.enable ini setting, make sure we also disable ZCG(accelerator_enabled). --- NEWS | 3 +++ ext/opcache/ZendAccelerator.c | 1 - ext/opcache/tests/bug78106.phpt | 4 +--- ext/opcache/zend_accelerator_module.c | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index ebd5a694939..e072754f788 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2019, PHP 7.2.21 +- Opcache: + . Fixed bug #78106 (Path resolution fails if opcache disabled during request). + (Nikita) 27 Jun 2019, PHP 7.2.20 diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index b57d446df54..0d28e9d3a81 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2214,7 +2214,6 @@ static void accel_activate(void) zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME); zend_string_release(key); zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode"); - ZCG(accelerator_enabled) = 0; return; } } diff --git a/ext/opcache/tests/bug78106.phpt b/ext/opcache/tests/bug78106.phpt index 86c8acd3ae1..55cc53e7673 100644 --- a/ext/opcache/tests/bug78106.phpt +++ b/ext/opcache/tests/bug78106.phpt @@ -1,7 +1,5 @@ --TEST-- -Bug #78106: PHP Fatal error: Uncaught Error: Class 'Phpfastcache\Config\Config' not found ---XFAIL-- -Not fixed yet +Bug #78106: Path resolution fails if opcache disabled during request --FILE--