Browse Source

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

git-svn-id: svn://svn.lighttpd.net/xcache/branches/3.2@1535 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.2
Xuefer 7 years ago
parent
commit
e93dd4cd2c
  1. 1
      ChangeLog
  2. 1
      NEWS
  3. 14
      mod_cacher/xc_cacher.c

1
ChangeLog

@ -4,6 +4,7 @@ ChangeLog
* cacher:
* PHP_5_6 support
* fixed #333: reduce memory usage for small or empty files
* closes #337: adds warning about Zend OPcache optimization level incompatiblity
3.1.1 2014-09-02
ChangeLog

1
NEWS

@ -2,6 +2,7 @@
========
* PHP_5_6 support
* reduce memory usage for small or empty files
* aware of Zend OPcache
3.1.1 2014-09-02
========

14
mod_cacher/xc_cacher.c

@ -3693,9 +3693,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