1

I installed Xcache on a Debian 6 server, however despite it being activated, no pages are being cached.

Apache is installed via the repos, however PHP 5.4 and xcache are compiled from source. PHP is running as an Apache module.

When I view the diagnostics page in the admin section, it says that 'Enabling PHP Cacher' status is 'Error' as no pages have been cached and that I should set xcache.cacher to 'On', which I already have.

PHP output:

# php -v
PHP 5.4.10 (cli) (built: Feb 13 2013 16:50:20) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with XCache v3.0.1, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.0.1, Copyright (c) 2005-2013, by mOo

In addition, phpinfo shows that the XCache Cacher Module is enabled.

My xcache settings:

[xcache]
xcache.shm_scheme =        "mmap"
xcache.size  =               64M
xcache.count =                 1
xcache.slots =                8K
xcache.ttl   =                 0
xcache.gc_interval =           0
xcache.var_size  =            4M
xcache.var_count =             1
xcache.var_slots =            8K
xcache.var_ttl   =             0
xcache.var_maxttl   =          0
xcache.var_gc_interval =     300
xcache.var_namespace_mode =    0
xcache.var_namespace =        ""
xcache.readonly_protection = Off
xcache.mmap_path =    "/dev/zero"
xcache.coredump_directory =   ""
xcache.coredump_type =         0
xcache.disable_on_crash =    Off
xcache.experimental =        Off
xcache.cacher =               On
xcache.stat   =               On
xcache.optimizer =           On
[xcache.coverager]
xcache.coverager =           Off
xcache.coverager_autostart =  On
xcache.coveragedump_directory = ""

I'm a little stuck. There's nothing in the .htaccess file that would disable it, same goes for inside the VirtualHosts block. I'm not sure where to look next to solve this problem, as from what I can see, it should be working.

Marcus
  • 165
  • 3
  • 10

1 Answers1

1

I noticed the same problem when xcache.mmap_path wasn't set — it looks like your's is set but make sure it's a writable directory. In my case (on OSX) I'm using:

xcache.mmap_path = /tmp/xcache
Mark Fox
  • 126
  • 3
  • 1
    Ey, during subsequent testing after I posted this question I found that on Debian I had to set the directory to something other than /dev/zero, however the config worked on a Centos box unaltered. Just one of those things, I suppose. – Marcus Nov 20 '13 at 11:12