Changeset d9514bc in git


Ignore:
Timestamp:
2014-09-12T05:05:43Z (3 years ago)
Author:
Xuefer <xuefer@…>
Branches:
master, trunk
Children:
fdc10b8
Parents:
708688b3
Message:

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

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r46d274f rd9514bc  
    1111   * (WIP) cache to disk
    1212   * added class const support for __FILE__ __DIR__
     13   * closes #337: adds warning about Zend OPcache optimization level incompatiblity
    1314 * disassembler, decompiler:
    1415   * PHP_5_6 support
  • NEWS

    r46d274f rd9514bc  
    44 * cache defragment, cache to disk
    55 * added class const support for __FILE__ __DIR__
     6 * aware of Zend OPcache
    67 * updated disassembler decompiler support
    78
  • mod_cacher/xc_cacher.c

    r708688b3 rd9514bc  
    38823882    ext = zend_get_extension("Zend Optimizer");
    38833883    if (ext) {
    3884         /* zend_optimizer.optimization_level>0 is not compatible with other cacher, disabling */
     3884        char *value;
     3885        if (cfg_get_string("zend_optimizer.optimization_level", &value) == SUCCESS && zend_atol(value, strlen(value)) > 0) {
     3886            zend_error(E_NOTICE, "Zend Optimizer with zend_optimizer.optimization_level>0 is not compatible with other cacher, disabling");
     3887        }
    38853888        ext->op_array_handler = NULL;
    38863889    }
     3890
     3891    ext = zend_get_extension("Zend OPcache");
     3892    if (ext) {
     3893        char *value;
     3894        if (cfg_get_string("opcache.optimization_level", &value) == SUCCESS && zend_atol(value, strlen(value)) > 0) {
     3895            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");
     3896        }
     3897    }
     3898
    38873899    /* cache if there's an op_array_ctor */
    38883900    for (ext = zend_llist_get_first_ex(&zend_extensions, &lpos);
Note: See TracChangeset for help on using the changeset viewer.