0

I installed xcache (php-xcache-3.1.0-1) on arch linux (on a raspberry), but I don't get the opcode cache working. My xcache.ini looks like:

xcache.cacher = On
xcache.size = 32M
xcache.var_size = 32M

From it's documentation this should be enough. Indeed the 'var_size > 0' enables variable caching, but opcode caching is still disabled. Does anybody has some ideas?


From 'php -i' I get:

XCache Cacher

XCache Cacher Module => enabled
Readonly Protection => disabled
Page Request Time => 2013-12-13 13:57:50
Cache Init Time => 2013-12-13 13:57:50
Cache Instance Id => 1299
Opcode Cache => disabled
Variable Cache => enabled, 33,554,432 bytes, 1 split(s), with 8192 slots each
Shared Memory Schemes => mmap

Directive => Local Value => Master Value
xcache.admin.enable_auth => On => On
xcache.allocator => bestfit => bestfit
xcache.cacher => On => On
xcache.count => 1 => 1
xcache.gc_interval => 0 => 0
xcache.mmap_path => /dev/zero => /dev/zero
xcache.readonly_protection => Off => Off
xcache.shm_scheme => mmap => mmap
xcache.size => 32M => 32M
xcache.slots => 8K => 8K
xcache.stat => On => On
xcache.ttl => 0 => 0
xcache.var_allocator => bestfit => bestfit
xcache.var_count => 1 => 1
xcache.var_gc_interval => 120 => 120
xcache.var_maxttl => 0 => 0
xcache.var_namespace => no value => no value
xcache.var_namespace_mode => 0 => 0
xcache.var_size => 32M => 32M
xcache.var_slots => 8K => 8K
xcache.var_ttl => 0 => 0
PowerStat
  • 3,757
  • 8
  • 32
  • 57
gmoktop
  • 131
  • 1
  • 4
  • did you configure with `--enable-opcache` ? You enable with `opcache.enable=On` – exussum Dec 13 '13 at 14:19
  • Yes, according to `php -i`, php is configured with `--enable-opcache`. `opcache.enable = On` should be the default. Anyway, I added it to php.ini, but it did not help. – gmoktop Dec 13 '13 at 15:10
  • For the benefit of anyone with Apache, XCache 3.1.1 (or similar) and SELinux installed that can't get the cacher to work even though it appears to be loaded and running, SELinux may be blocking access to /dev/zero as this bug appeared in Fedora/CentOS: [1700758 - SELinux is preventing httpd from map access on the chr_file /dev/zero](https://bugzilla.redhat.com/show_bug.cgi?id=1700758). Before running the instructions in the bug report, you can confirm that SELinux is causing this by editing the xcache.ini file, changing the xcache.mmap_path value to /tmp/xcache and restarting Apache. – Noel Whitemore Dec 06 '20 at 13:47

0 Answers0