Req #8605 [Opn->Csd]: Need a php.ini option to skip the include_once rewrite
| From: | pollita@php.net | Date: | Fri, 01 Sep 2006 22:01:43 +0000 |
| Subject: | Req #8605 [Opn->Csd]: Need a php.ini option to skip the include_once rewrite | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-5220@lists.php.net to get a copy of this message | ||
Edit report at http://pecl.php.net/bugs/bug.php?id=8605&edit=1
ID: 8605
Updated by: pollita@php.net
Reported By: jrags at jasrags dot net
-Status: Open
+Status: Closed
Type: Feature/Change Request
-Package: APC
+Package: Bug System
Operating System: Fedora Core 5
PHP Version: 5.1.4
New Comment:
This bug has been fixed in CVS.
In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.
In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.
Applied, though slightly differently than the patch you provided and
under a slightly different name.
Previous Comments:
------------------------------------------------------------------------
[2006-08-31 22:45:28] jrags at jasrags dot net
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
------------------------------------------------------------------------
--
Edit this bug report at http://pecl.php.net/bugs/bug.php?id=8605&edit=1