0

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    
2
  • Start by installing a supported operating system. Ubuntu 13.04 has been end of life for more than a year now. Nov 6, 2014 at 5:16
  • Ok I updated my server to Ubuntu 14.04, but the problem is still exactly the same.
    – 118218
    Nov 6, 2014 at 16:56

1 Answer 1

2

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

1
  • Thanks! Before upgrading to 14.04 I was on PHP 5.3, so.. Ok I enabled opcache then. It's just a pity because you have to install some third party extensions to have some statistics. I have no time now to do it, then I hope opcache is correctly enabled since I haven't any way to verify that.
    – 118218
    Nov 6, 2014 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .