APCu logs: Memcache \OC\Memcache\APCu not available for local cache

Steps to reproduce
Followed offifical guide: Official Guide
1. apt-get install php5-apcu (installs version 4.0.7-1)
2. service apache2 restart
3. Edit config.php to include "'memcache.local' => '\OC\Memcache\APCu',"

Expected behaviour
Memory Cache warning disappears from admin page

Actual behaviour
Memory Cache warning disappears from admin page
Entry appears in log (twice with 30 sec inbetween, never since): "OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/owncloud/lib/private/Memcache/Factory.php#95"

Server configuration
Operating system: Debian GNU/Linux 8 (jessie) - 3.16.0-4-amd64
Web server: Apache/2.4.10 (Debian)
Database: 15.1 Distrib 10.0.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
PHP version: 5.6.23-0+deb8u1 (cli) - Zend Engine v2.6.0 with Zend OPcache v7.0.6-dev
ownCloud version (see ownCloud admin page): 9.1.0 (stable)
Updated from an older ownCloud or fresh install: Fresh install
ownCloud log:
Error PHP OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/owncloud/lib/private/Memcache/Factory.php#95 2016-07-25T15:50:00+00:00
Error PHP OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at /var/www/owncloud/lib/private/Memcache/Factory.php#95 2016-07-25T15:49:30+00:00

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): None

Integrity status for oC9+

sudo -u www-data php /var/www/owncloud/occ integrity:check-core

did not yield any results


make sure that APCu is actually loaded / enabled within PHP.

This is the (hopefully) relevant section of the phpinfo:

Does the received error message in your logs contains something about cron?

If yes you need to put apc.enable_cli=1 into /etc/php5/cli/php.ini


I guess not.
I copied the content as is.

I think the:

twice with 30 sec inbetween, never since

shows that those where coming from cron or the occ command line. To prevent those you need to follow the instruction above.

This would not impact any other aspect of my server's configuration?
If I can add this without any (unrelated) impacts I would be happy to add the line and check back in around 24 hours to see if this topic has been resolved.

That probably needs a research on your own on your favorite search engine.

I have only just got around to setting up a cron job over the default Ajax option.
So as far as I understand I should have triggered chron.php every time I (re)loaded a page.
Doesn't this mean I would have triggered more entries in the error log?

The differences are described in the documentation:


So yes, if you now configure "Cron" within the GUI and configuring a system cron which calls the cron.php you're getting this logentry at each cron run until you're configuring the mentioned php.ini option.

You installed Memcache APCu too?, or only the PHP APCu?. You need booth.

I have only installed the packages as described before (only php5-apcu).
This is according to the documentation.
I have left it to do it's thing for a while and have not encountered another log entry of the same kind.
This leads me to believe that it has nothing to do with the cron jobs.

OK, i had access with remove and reinstall APCu like this

apt-get remove php5-APCu
apt-get install php-pear php5-dev
pecl install APCu

'memcache.local' => '\OC\Memcache\APCu', # \ take this in php config

Two (2) of \ this in php-config. it was important in my config!.

Just did a write-up about the message if it contains a cli entry in the log output:

I guess this command "apt-get install php5-apcu" may cause some trouble.

What I am going to do is set enable=1 in the "remi-php56" of the file /etc/yum.repos.d/remi.repo. Use the yum install -y php-ecl-apcu to install APCu, then APCu module might keep the same compatible version with the PHP and run fully functional.

apt-get install php5-apcu

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package php5-apcu