Yet another error I encountered while tweaking my ownCloud installation on my VPS at time4vps.eu. 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.
Problem
I was following the guide and instructions found under doc.owncloud.org, 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.
Solution
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-apcuThis should return the currently installed php5-apcu version. If this is older than 4.0.6 then continue reading.
- Remove the old APCu version (if installed via apt-get) with
sudo apt-get remove php5-apcu - Go to http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/ and copy the link to a version 4.0.6 at least which corresponds with your system's architecture.
- cd /tmp/
- sudo wget http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb
(since my system is amd64 architecture) - Install manually with dpkg
sudo dpkg -i php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb - Remove downloaded file
sudo rm php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb - Restart your apache2 server
sudo /etc/init.d/apache2 restart
You can check what kind of system you have with uname -a.
Additional to ownCloud Caching Guide
In addition to the official doc.ownCloud.org 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.
Check,
php -iAnd look for
apc.enable_cli => On => OnIf any of them is Off then this is your problem. Edit your php.ini with,
apc.enabled => On => On
sudo nano /etc/php5/cli/php.iniand copy the following into the file,
;;;;;;;;;;;;;;;;;;Press CTRL+O for saving and CTRL+X for exiting.
;Memory chacing ;
;;;;;;;;;;;;;;;;;;
;Added manually to enable memory chancing for ownCloud
apc.enable_cli=1
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.