The class ‘APCIterator’ could not be found

This article was published 4 years ago. Due to the rapidly evolving world of technology, some concepts may no longer be applicable.

This one catches me out every time, so documenting here for posterity.

Firstly, make sure apc or apcu (PHP 5.5+) is installed by running php -m | grep apc.

If you do have it installed but you’re still getting the error The class 'APCIterator' could not be found. then you probably need to enable APC on the command line. Make sure the following lines exist in your php.ini file:

apc.enabled = on
apc.enable_cli = on

Thoughts on this post

Leave a comment?

Leave a Reply