Changeset d6a2609 in git


Ignore:
Timestamp:
2013-05-10T17:52:02Z (7 years ago)
Author:
Xuefer <xuefer@…>
Branches:
3.1, 3.2, master, trunk
Children:
3eb6e9b
Parents:
8fc2642
Message:

fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when xcache enabled

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1238 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    re0bf6cd rd6a2609  
    1010 * fixes #303: tablesort.js not found in Diagnosis and Coverager
    1111 * fixes #297: segv on startup under sparc, ini setting overflow
     12 * fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when readonly_protection is not in use
    1213
    13143.0.1 2013-01-11
  • NEWS

    r7fe46fb rd6a2609  
    77========
    88 * bug fixes
     9 * "cannot redeclare class" errors is now gone. Can also be avoid by using readonly_protection (unavailable with /dev/zero).
    910
    10113.0.1 2013-01-11
  • mod_cacher/xc_cache.h

    r36ef103 rd6a2609  
    194194    zend_arg_info *arg_info;
    195195#endif
     196#ifdef ZEND_ENGINE_2_4
     197    zend_literal *literals;
     198#endif
    196199    zend_op *opcodes;
    197200} xc_gc_op_array_t;
  • mod_cacher/xc_cacher.c

    r7fe46fb rd6a2609  
    22922292        efree(op_array->opcodes);
    22932293    }
     2294#ifdef ZEND_ENGINE_2_4
     2295    if (op_array->literals) {
     2296        efree(op_array->literals);
     2297    }
     2298#endif
    22942299}
    22952300/* }}} */
  • processor/processor.m4

    r4d16d53 rd6a2609  
    728728        zend_bool gc_arg_info = 0;
    729729        zend_bool gc_opcodes  = 0;
     730#ifdef ZEND_ENGINE_2_4
     731        zend_bool gc_literals = 0;
     732#endif
    730733        /* really fast shallow copy */
    731734        memcpy(dst, src, sizeof(src[0]));
     
    744747        dst->filename = processor->entry_php_src->filepath;
    745748#ifdef ZEND_ENGINE_2_4
    746         if (src->literals /* || op_array_info->literalsinfo_cnt */) {
     749        if (src->literals) {
    747750            gc_opcodes = 1;
     751            if (op_array_info->literalinfo_cnt) {
     752                gc_literals = 1;
     753            }
    748754        }
    749755#else
    750756        if (op_array_info->oplineinfo_cnt) {
    751757            gc_opcodes = 1;
     758        }
     759#endif
     760#ifdef ZEND_ENGINE_2_4
     761        if (gc_literals) {
     762            dnl used when copying opcodes
     763            COPY_N_EX(last_literal, zend_literal, literals)
    752764        }
    753765#endif
     
    801813            }
    802814        }
    803         if (gc_arg_info || gc_opcodes) {
     815        if (gc_arg_info || gc_opcodes || gc_literals) {
    804816            xc_gc_op_array_t gc_op_array;
    805817#ifdef ZEND_ENGINE_2
     
    808820#endif
    809821            gc_op_array.opcodes  = gc_opcodes ? dst->opcodes : NULL;
     822#ifdef ZEND_ENGINE_2_4
     823            gc_op_array.literals = gc_literals ? dst->literals : NULL;
     824#endif
    810825            xc_gc_add_op_array(&gc_op_array TSRMLS_CC);
    811826        }
Note: See TracChangeset for help on using the changeset viewer.