Skip to content

Commit

Permalink
Fixed bug #78106
Browse files Browse the repository at this point in the history
When disabling opcache during the request via opcache.enable ini
setting, make sure we also disable ZCG(accelerator_enabled).
  • Loading branch information
nikic committed Jun 13, 2019
1 parent f8a68fd commit f1a8138
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
4 changes: 1 addition & 3 deletions ext/opcache/tests/bug78106.phpt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions ext/opcache/zend_accelerator_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ static ZEND_INI_MH(OnEnable)
return FAILURE;
} else {
*p = 0;
ZCG(accelerator_enabled) = 0;
return SUCCESS;
}
}
Expand Down

0 comments on commit f1a8138

Please sign in to comment.