|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-01 18:01 UTC] pollita@php.net
[2006-09-01 18:47 UTC] jrags at jasrags dot net
[2006-09-01 20:09 UTC] pierre dot php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 08:00:02 2025 UTC |
Description: ------------ APC 3.0.11 I understand the reason behind adding the include_once to include rewriting but it causes problems for me, i added a php.ini feature to skip this, but i would love to see it included in the next release. see below for my code Reproduce code: --------------- APC 3.0.11 I understand the reason behind adding the include_once to include rewriting but it causes problems for me, i added a php.ini feature to skip this, but i would love to see it included in the next release. see below for my code apc_globals.h: --> zend_bool enable_include_rewrite; ZEND_END_MODULE_GLOBALS(apc) apc_zend.c: #include "apc_zend.h" -->#include "apc_globals.h" /* Cheat our way through the file inclusion by temporarily changing the op to a plain require/include * Then calling into the original opcode handler, and finally restoring the opline's original meaning */ --> if(APCG(enable_include_rewrite)) { Z_LVAL(opline->op2.u.constant) = (Z_LVAL(opline->op2.u.constant) == ZEND_INCLUDE_ONCE) ? ZEND_INCLUDE : ZEND_REQUIRE; --> } ret = apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); --> if(APCG(enable_include_rewrite)) { Z_LVAL(opline->op2.u.constant) = (Z_LVAL(opline->op2.u.constant) == ZEND_INCLUDE) ? ZEND_INCLUDE_ONCE : ZEND_REQUIRE_ONCE; --> } php_apc.c: -->STD_PHP_INI_BOOLEAN("apc.enable_include_rewrite", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_include_rewrite, zend_apc_globals, apc_globals) PHP_INI_END() php.ini: apc.enable_include_rewrite=0 Expected result: ---------------- This disables the codeblock mentioned Actual result: -------------- Works as expected