com php-src: Fixed bug #78106: ext/opcache/ZendAccelerator.c ext/opcache/tests/bug78106.phpt ext/opcache/zend_accelerator _module.c
| From: | Remi Collet | Date: | Tue, 18 Jun 2019 05:48:37 +0000 |
| Subject: | com php-src: Fixed bug #78106: ext/opcache/ZendAccelerator.c ext/opcache/tests/bug78106.phpt ext/opcache/zend_accelerator _module.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106849@lists.php.net to get a copy of this message | ||
Commit: 42c7d5106b03e0a07cfa6f40ed2d883575d6fcc3
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 13 Jun 2019 12:51:35 +0200
Committer: Remi Collet <remi@php.net> Tue, 18 Jun 2019 07:48:37 +0200
Parents: f6c93431b30829cf83265826cc8b1ad103be3034
Branches: PHP-7.2.20
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=42c7d5106b03e0a07cfa6f40ed2d883575d6fcc3
Log:
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)
Bugs:
https://bugs.php.net/78106
Changed paths:
M ext/opcache/ZendAccelerator.c
M ext/opcache/tests/bug78106.phpt
M ext/opcache/zend_accelerator_module..c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index b57d446..0d28e9d 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 86c8acd..55cc53e 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 4d4de77..d74b2ac 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;
}
}