|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61398 APC fails to find class methods
Submitted: 2012-03-15 10:57 UTC Modified: 2012-08-07 11:39 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: letharion at gmail dot com Assigned: ab (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.4.0 OS: Linux/Windows
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: letharion at gmail dot com
New email:
PHP Version: OS:


 [2012-03-15 10:57 UTC] letharion at gmail dot com
There is a similar issue here: but the last comment seems a bit different, is for another php version, and very similar to my issue, so I believe we may have a different source of our problem.

When calling any page in my Drupal setup, I get:
Fatal error: Class SchemaCache contains 5 abstract methods and must therefore be declared abstract or implement the remaining methods (DrupalCacheArray::resolveCacheMiss, ArrayAccess::offsetExists, ArrayAccess::offsetGet, ...) in /var/www/ on line 2849

The code is publicly available here:
where it's easy to see that the 5 methods _are_ implemented. Disabling APC solves the issue.

Last comment from 59197 copied in:
I'm seeing a similar issue using APC 3.1.9 with PHP 5.4.0RC4 on Windows (Win7 
x64, Apache 2.2.17). I've built APC myself using VS2008 (shared, TS, x86, 

After enabling APC, my app crashes randomly with bogus error messages. Sometimes methods in subclasses are not detected:


class Base {
   abstract protected function foo();


class Sub extends Base {
   protected function foo() { print "world!"; }

After including both files, I get "Sub contains abstract methods and must 
therefore also be abstract (Base::foo())". When I restart Apache, the error goes 
away for one request. After that, I get "Call to undefined method 
Loader::addPath" (this method definitely exists, disabling APC makes it work 

My APC config:

apc.enabled = On
apc.cache_by_default = On
apc.slam_defense = 0
apc.write_lock = 1

Expected result:
I would expect the code to run. :)

Actual result:
Error message, posted in description.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-18 13:13 UTC]
-Status: Open +Status: Feedback
 [2012-03-18 13:13 UTC]
Surely a duplicate of #61219

Please try using svn's trunk.
 [2012-07-21 21:12 UTC]
fixed with APC 3.1.10 at least, see also bug #61219
 [2012-07-21 21:12 UTC]
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: ab
 [2012-07-22 16:56 UTC]
This bug seems to be not fixed yet as the test based on the reproduce code from  
bug #38779 fails with APC but passes without it. It has definitely something to 
do with stream wrappers.
 [2012-07-22 16:56 UTC]
-Status: Closed +Status: Re-Opened
 [2012-07-22 16:58 UTC]
Automatic comment from SVN on behalf of ab
Log: added test for bug #61398
 [2012-07-22 18:48 UTC]
Automatic comment from SVN on behalf of ab
Log: fixed the bug #61398 test
 [2012-08-07 11:37 UTC]
Automatic comment from SVN on behalf of ab
Log: fixed bug where apc requires url_stat to be implemented for userspace stream wrappers in require
related to bug #62502, bug #61398, bug #38779
 [2012-08-07 11:39 UTC]
fixed in svn
 [2012-08-07 11:39 UTC]
-Status: Re-Opened +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 22:01:28 2024 UTC