Changeset 1533 in svn


Ignore:
Timestamp:
2014-09-12T05:05:43Z (3 years ago)
Author:
Xuefer
Message:

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r1530 r1533  
    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
  • trunk/NEWS

    r1530 r1533  
    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
  • trunk/mod_cacher/xc_cacher.c

    r1532 r1533  
    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.