Skip to content

Commit f1a8138

Browse files
committed
Fixed bug #78106
When disabling opcache during the request via opcache.enable ini setting, make sure we also disable ZCG(accelerator_enabled).
1 parent f8a68fd commit f1a8138

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2019, PHP 7.2.21
44

5+
- Opcache:
6+
. Fixed bug #78106 (Path resolution fails if opcache disabled during request).
7+
(Nikita)
58

69
27 Jun 2019, PHP 7.2.20
710

ext/opcache/ZendAccelerator.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,6 @@ static void accel_activate(void)
22142214
zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
22152215
zend_string_release(key);
22162216
zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode");
2217-
ZCG(accelerator_enabled) = 0;
22182217
return;
22192218
}
22202219
}

ext/opcache/tests/bug78106.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
2-
Bug #78106: PHP Fatal error: Uncaught Error: Class 'Phpfastcache\Config\Config' not found
3-
--XFAIL--
4-
Not fixed yet
2+
Bug #78106: Path resolution fails if opcache disabled during request
53
--FILE--
64
<?php
75

ext/opcache/zend_accelerator_module.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ static ZEND_INI_MH(OnEnable)
240240
return FAILURE;
241241
} else {
242242
*p = 0;
243+
ZCG(accelerator_enabled) = 0;
243244
return SUCCESS;
244245
}
245246
}

0 commit comments

Comments
 (0)