|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59951 APC & unnecessary stat() calls with dynamic include()
Submitted: 2011-09-14 09:36 UTC Modified: 2016-11-18 21:36 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: gwillem at gmail dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.3.6 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gwillem at gmail dot com
New email:
PHP Version: OS:


 [2011-09-14 09:36 UTC] gwillem at gmail dot com
APC uses a stat64() call if the argument to include() is a 

It doesn't, if the argument is a string. 

In both cases the opcode cache works fine. 

In applications with many include()s and slow storage, it 
would be nice to eliminate this.

Reproduce code:
$file = "a.php";
include $file;
include "b.php";

Expected result:
No stat64() calls

Actual result:
open("/home/willem/index.php", O_RDONLY|O_LARGEFILE) = 5 
fstat64(5, {st_mode=S_IFREG|0644, st_size=58, ...}) = 0 
getcwd("/", 4095) = 2 
chdir("/home/willem") = 0 
close(5)  = 0 
stat64("./a.php", {st_mode=S_IFREG|0644, st_size=2, ...}) = 0 
getcwd("/home/willem", 4096)


apc-stat-patch (last revision 2011-10-22 06:50 UTC by noda dot yoshikazu at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-22 07:04 UTC] noda dot yoshikazu at gmail dot com
A note for the apc-stat-patch:

It is for APC-3.1.9. Not tested with older versions.

 [2016-11-18 21:36 UTC]
-Status: Open +Status: Wont fix
 [2016-11-18 21:36 UTC]
APC is no longer supported in favor of opcache that comes bundled with PHP, if you wish to use the user cache, then look at PECL/APCu.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 14:01:29 2024 UTC