Sunday, February 14, 2016

ownCloud 8.1 APCu Memcache error

Yet another error I encountered while tweaking my ownCloud installation on my VPS at I was trying to enable the APCu memory caching to improve performance on my ownCloud 8.1 running with php 5.5.9 on an Ubuntu 14.04 server. 


I was following the guide and instructions found under, however I quickly encountered a problem. Upon installing php5-apcu with
sudo apt-get install php5-apcu
and enabling it as per the guide, I was greeted with a white screen when trying to log in to owncloud. No error messages, it seemed the server just didn't load. No entries in logs under /var/log/. Interesting.


It took me a while to figure out what happened, finally I stumbled upon this github issue 14386.

Basically it turns out that in Ubuntu 14.04 if you install php5-apcu with apt-get install you will get APCu version 4.0.2 and the required version for ownCloud is 4.0.6 at least. Hence you need to remove the one installed form the repository and install a later version manually.

To check if this is indeed your issue do,
sudo dpkg -s php5-apcu
This should return the currently installed php5-apcu version. If this is older than 4.0.6 then continue reading.
  1. Remove the old APCu version (if installed via apt-get) with
    sudo apt-get remove php5-apcu
  2. Go to and copy the link to a version 4.0.6 at least which corresponds with your system's architecture.
  3. cd /tmp/
  4. sudo wget
    (since my system is amd64 architecture)
  5. Install manually with dpkg
    sudo dpkg -i php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb
  6. Remove downloaded file
    sudo rm php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb
  7. Restart your apache2 server
    sudo /etc/init.d/apache2 restart
Note: Make sure you download the correct .deb file, i.e. amd64 or i386.
You can check what kind of system you have with uname -a.

Additional to ownCloud Caching Guide

In addition to the official guide you might have to adjust some settings in your /etc/php5/cli/php.ini if your installation is still not working. First check if apc.enable is "On" in your php.

php -i
And look for
apc.enable_cli => On => On
apc.enabled => On => On
If any of them is Off then this is your problem. Edit your php.ini with,
sudo nano /etc/php5/cli/php.ini
and copy the following into the file,
;Memory chacing  ;

;Added manually to enable memory chancing for ownCloud
Press CTRL+O for saving and CTRL+X for exiting.

Restart apache with
sudo /etc/init.d/apache2 restart
It should work now. If not, you can leave me a message and I will do my best to get back to you or you can also join the IRC channel at #owncloud for some help.

No comments:

Post a Comment