1
0
Fork 0

improve compatibility with "the ionCube PHP Loader", Zend Optimizer. dont do early binding for cached opcode

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1178 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2012-11-13 15:16:02 +00:00
parent 1a1f60d7a2
commit d74e43830e
5 changed files with 11 additions and 7 deletions

View File

@ -2,7 +2,7 @@
ChangeLog
========
* fixed #290: workaround phpize vs fbsd make bug again
* improve compatibility with "the ionCube PHP Loader", but still broken
* improve compatibility with "the ionCube PHP Loader", Zend Optimizer
3.0.0 2012-10-29
API Changes

1
NEWS
View File

@ -2,6 +2,7 @@
ChangeLog
========
* bug fixes
* improve compatibility with "the ionCube PHP Loader", Zend Optimizer
3.0.0 2012-10-29
========

View File

@ -1945,7 +1945,6 @@ static zend_op_array *xc_compile_file_sandboxed(void *data TSRMLS_DC) /* {{{ */
#endif
memset(&compiler->new_php.op_array_info, 0, sizeof(compiler->new_php.op_array_info));
XG(initial_compile_file_called) = 0;
zend_try {
compiler->new_php.op_array = NULL;
xc_compile_php(compiler, sandboxed_compiler->h, sandboxed_compiler->type TSRMLS_CC);

View File

@ -229,6 +229,7 @@ static xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, ZEND_24(NOTHING, con
#endif
XG(sandbox) = (void *) sandbox;
XG(initial_compile_file_called) = 0;
return sandbox;
}
/* }}} */
@ -290,13 +291,16 @@ static void xc_sandbox_install(xc_sandbox_t *sandbox TSRMLS_DC) /* {{{ */
}
#endif
/* CG(compiler_options) applies only if initial_compile_file_called */
if (XG(initial_compile_file_called)) {
#ifdef ZEND_COMPILE_DELAYED_BINDING
zend_do_delayed_early_binding(CG(active_op_array) TSRMLS_CC);
zend_do_delayed_early_binding(CG(active_op_array) TSRMLS_CC);
#else
xc_undo_pass_two(CG(active_op_array) TSRMLS_CC);
xc_foreach_early_binding_class(CG(active_op_array), xc_early_binding_cb, (void *) sandbox TSRMLS_CC);
xc_redo_pass_two(CG(active_op_array) TSRMLS_CC);
xc_undo_pass_two(CG(active_op_array) TSRMLS_CC);
xc_foreach_early_binding_class(CG(active_op_array), xc_early_binding_cb, (void *) sandbox TSRMLS_CC);
xc_redo_pass_two(CG(active_op_array) TSRMLS_CC);
#endif
}
#ifdef XCACHE_ERROR_CACHING
/* restore trigger errors */

View File

@ -1,7 +1,7 @@
#include "util/xc_stack.h"
ZEND_BEGIN_MODULE_GLOBALS(xcache)
zend_bool initial_compile_file_called; /* true is origin_compile_file is called */
zend_bool initial_compile_file_called; /* true if origin_compile_file is called */
zend_bool cacher; /* true if enabled */
zend_bool stat;
zend_bool experimental;