Browse Source

closes #337: adds warning about Zend OPcache optimization level incompatiblity

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1533 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
master
Xuefer 7 years ago
parent
commit
d9514bcc6b
  1. 1
      ChangeLog
  2. 1
      NEWS
  3. 14
      mod_cacher/xc_cacher.c

1
ChangeLog

@ -10,6 +10,7 @@ ChangeLog
* (WIP) defragment
* (WIP) cache to disk
* added class const support for __FILE__ __DIR__
* closes #337: adds warning about Zend OPcache optimization level incompatiblity
* disassembler, decompiler:
* PHP_5_6 support
* misc:

1
NEWS

@ -3,6 +3,7 @@
* api updates
* cache defragment, cache to disk
* added class const support for __FILE__ __DIR__
* aware of Zend OPcache
* updated disassembler decompiler support
3.2.1 2013-??-??

14
mod_cacher/xc_cacher.c

@ -3881,9 +3881,21 @@ static PHP_MINIT_FUNCTION(xcache_cacher) /* {{{ */
ext = zend_get_extension("Zend Optimizer");
if (ext) {
/* zend_optimizer.optimization_level>0 is not compatible with other cacher, disabling */
char *value;
if (cfg_get_string("zend_optimizer.optimization_level", &value) == SUCCESS && zend_atol(value, strlen(value)) > 0) {
zend_error(E_NOTICE, "Zend Optimizer with zend_optimizer.optimization_level>0 is not compatible with other cacher, disabling");
}
ext->op_array_handler = NULL;
}
ext = zend_get_extension("Zend OPcache");
if (ext) {
char *value;
if (cfg_get_string("opcache.optimization_level", &value) == SUCCESS && zend_atol(value, strlen(value)) > 0) {
zend_error(E_WARNING, "Constant folding feature in Zend OPcache is not compatible with XCache's __DIR__ handling, please set opcache.optimization_level=0 or disable Zend OPcache");
}
}
/* cache if there's an op_array_ctor */
for (ext = zend_llist_get_first_ex(&zend_extensions, &lpos);
ext;

Loading…
Cancel
Save