diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-13 12:51:35 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-06-18 09:05:24 +0200 |
commit | a2058937bc5d01b3fda0726348279b6e7296e586 (patch) | |
tree | a5f4128a255799b9ae2ec1b95d6b2cac1939c571 | |
parent | b6af9da5a0e72d3a295616be2783e4ee4f9d0dd4 (diff) | |
download | php-git-a2058937bc5d01b3fda0726348279b6e7296e586.tar.gz |
Fixed bug #78106
When disabling opcache during the request via opcache.enable ini
setting, make sure we also disable ZCG(accelerator_enabled).
(cherry picked from commit f1a81380554070d7f4b0c6dcd1202364ebf3d252)
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 1 | ||||
-rw-r--r-- | ext/opcache/tests/bug78106.phpt | 4 | ||||
-rw-r--r-- | ext/opcache/zend_accelerator_module.c | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 291cb828f2..d3d72ff147 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2360,7 +2360,6 @@ static void accel_activate(void) zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME); zend_string_release_ex(key, 0); 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 86c8acd3ae..55cc53e767 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-- <?php diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 23585d0d46..51e86e8b3a 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -240,6 +240,7 @@ static ZEND_INI_MH(OnEnable) return FAILURE; } else { *p = 0; + ZCG(accelerator_enabled) = 0; return SUCCESS; } } |