|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-18 10:01 UTC] gopalv82 at yahoo dot com
[2008-01-07 09:28 UTC] gabriel at oxeva dot fr
[2008-07-17 12:54 UTC] gopalv82 at yahoo dot com
[2012-11-20 21:16 UTC] yuri at theredpin dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Jan 04 10:00:01 2026 UTC |
Description: ------------ apc.filters allow defining if a file must be cached or not. But filters don't work on included files in PHP code with include(_once) and require(_once) methods. Reproduce code: --------------- Just write a PHP script with include ('file.php'); within. For example : the file /home/test/test.php : <?php include('file.php'); ?> then set apc.filters = '/home/test/' APC must not cache both test.php and file.php. Instead, test.php is well filtered, but not file.php Expected result: ---------------- APC don't cache anything in this case. Actual result: -------------- In the file apc_main.c, function zend_op_array, zend_file_handle h contains an opened_path and a filename string. While these 2 strings are filled with the filename of the main script called, included file have a different behaviour : opened_path is unset and h->filename is set to the name of included file (if include('file.php'), then h->filename is "file.php" and if include('/home/test/file.php'), h->filename is "/home/test/file.php") if we wan't apc.filters work right with included file, we must have the full path+filename in h->filename instead of the filename given as argument to include().