APC cache is enabled but not caching anything

alternative-php-cacheubuntu-14.04

I am trying to enable APC in a server running Ubuntu 14.04

APC seems to be correctly enabled since when I run this command:

sudo php -i | grep "apc"

The terminal returns that:

apc
apcu
apc.coredump_unmap => Off => Off
apc.enable_cli => Off => Off
apc.enabled => On => On
apc.entries_hint => 4096 => 4096
apc.gc_ttl => 3600 => 3600
apc.mmap_file_mask => no value => no value
apc.preload_path => no value => no value
apc.rfc1867 => Off => Off
apc.rfc1867_freq => 0 => 0
apc.rfc1867_name => APC_UPLOAD_PROGRESS => APC_UPLOAD_PROGRESS
apc.rfc1867_prefix => upload_ => upload_
apc.rfc1867_ttl => 3600 => 3600
apc.serializer => php => php
apc.shm_segments => 1 => 1
apc.shm_size => 32M => 32M
apc.slam_defense => On => On
apc.smart => 0 => 0
apc.ttl => 0 => 0
apc.use_request_time => On => On
apc.writable => /tmp => /tmp

Plus when I reach apc.php the page loads as expected, but no information is available. Date values are messed up:

Here is a screenshot of my apc.php rendering

And here a screenshot of a phpinfo() print

Finally here you have my configuration (/etc/php5/cli/conf.d/20-apcu.ini):

extension=apcu.so
apc.shm_size=10000      
apc.ttl=0               
apc.gc_ttl=3600         
apc.stat=1              
apc.max_file_size = 100M    

Best Answer

APC dont run on php 5.5, try to use opcache installed by default on php 5.5 -> http://php.net/manual/en/book.opcache.php

You can read more on this reply -> https://stackoverflow.com/a/10109553/1530342

Related Topic