Changeset 1239


Ignore:
Timestamp:
2013-05-16T06:01:18+02:00 (17 months ago)
Author:
moo
Message:

merged [1238] from trunk: fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when readonly_protection is not in use

Location:
branches/3.0
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0

    • Property svn:mergeinfo changed
      /trunkmerged: 1238
  • branches/3.0/ChangeLog

    r1236 r1239  
    44 * fixes #303: tablesort.js not found in Diagnosis and Coverager 
    55 * fixes #297: segv on startup under sparc, ini setting overflow 
     6 * fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when readonly_protection is not in use 
    67 
    783.0.1 2013-01-11 
  • branches/3.0/NEWS

    r1231 r1239  
    22======== 
    33 * bug fixes 
     4 * "cannot redeclare class" errors is now gone. Can also be avoid by using readonly_protection (unavailable with /dev/zero). 
    45 
    563.0.1 2013-01-11 
  • branches/3.0/mod_cacher/xc_cache.h

    r1201 r1239  
    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; 
  • branches/3.0/mod_cacher/xc_cacher.c

    r1204 r1239  
    22832283        efree(op_array->opcodes); 
    22842284    } 
     2285#ifdef ZEND_ENGINE_2_4 
     2286    if (op_array->literals) { 
     2287        efree(op_array->literals); 
     2288    } 
     2289#endif 
    22852290} 
    22862291/* }}} */ 
  • branches/3.0/processor/processor.m4

    r1201 r1239  
    717717        zend_bool gc_arg_info = 0; 
    718718        zend_bool gc_opcodes  = 0; 
     719#ifdef ZEND_ENGINE_2_4 
     720        zend_bool gc_literals = 0; 
     721#endif 
    719722        /* really fast shallow copy */ 
    720723        memcpy(dst, src, sizeof(src[0])); 
     
    733736        dst->filename = processor->entry_php_src->filepath; 
    734737#ifdef ZEND_ENGINE_2_4 
    735         if (src->literals /* || op_array_info->literalsinfo_cnt */) { 
     738        if (src->literals) { 
    736739            gc_opcodes = 1; 
     740            if (op_array_info->literalinfo_cnt) { 
     741                gc_literals = 1; 
     742            } 
    737743        } 
    738744#else 
    739745        if (op_array_info->oplineinfo_cnt) { 
    740746            gc_opcodes = 1; 
     747        } 
     748#endif 
     749#ifdef ZEND_ENGINE_2_4 
     750        if (gc_literals) { 
     751            dnl used when copying opcodes 
     752            COPY_N_EX(last_literal, zend_literal, literals) 
    741753        } 
    742754#endif 
     
    787799            } 
    788800        } 
    789         if (gc_arg_info || gc_opcodes) { 
     801        if (gc_arg_info || gc_opcodes || gc_literals) { 
    790802            xc_gc_op_array_t gc_op_array; 
    791803#ifdef ZEND_ENGINE_2 
     
    794806#endif 
    795807            gc_op_array.opcodes  = gc_opcodes ? dst->opcodes : NULL; 
     808#ifdef ZEND_ENGINE_2_4 
     809            gc_op_array.literals = gc_literals ? dst->literals : NULL; 
     810#endif 
    796811            xc_gc_add_op_array(&gc_op_array TSRMLS_CC); 
    797812        } 
Note: See TracChangeset for help on using the changeset viewer.