/* * We hook into zend_compile_file to abort file compilation if necessary. */ static zend_op_array* my_compile_file(zend_file_handle* h, int type TSRMLS_DC) { bool file_ok = INI_BOOL("pwxe.filter") ? file_runnable(h->filename) : true; if (file_ok) { return old_compile_file(h, type TSRMLS_CC); } else { zend_error(E_COMPILE_ERROR, "Writable (or owned) file blocked by PWXE: \"%s\".", h->filename); return FAILURE; } }
static zend_op_array *xc_check_initial_compile_file(zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ { XG(initial_compile_file_called) = 1; return old_compile_file(h, type TSRMLS_CC); }