XCache in EasyApache Does Not Enable Opcode Caching
Why is this? After enabling it in my php.ini, restarting and running a "php -i" I am surprised to find the following:
Opcode Cache => disabled
Why is that?
I am considering recompiling XCache manually and re-integrating it.
-
Looks like the information in "php -i" is misleading. Here is my updated configuration and instructions which will give you access to the latest version and web interface which will allow you to optimize your XCache configuration. Hopefully they are of benefit to someone: # XCache Install and Configuration - 12/21/14 - David Turner cd /usr/local/src # Download latest stable build of XCache wget # Edit or add to /var/lib/php.ini (If using CloudLinux whichever file associated with the PHP build.) [XCache Loader] ;; *nix & freebsd extension="xcache.so" ;; Windows ; extension = php_xcache.dll [XCache Admin] xcache.admin.enable_auth="On" xcache.admin.user="adminusernamewhateveryoulike" xcache.admin.pass="md5_hash_from_above" [XCache Settings] xcache.cacher="on" xcache.shm_scheme="mmap" xcache.mmap_path="/dev/zero" xcache.coredump_directory="" ; CPU count -1 typically xcache.count="7" xcache.coveragedump_directory="/tmp/pcov/" xcache.optimizer="On" ; Turn readonly protection off for better performance xcache.readonly_protection="Off" ; The amount of RAM you wish to set for XCache usage xcache.size="512M" xcache.slots="8K" ; Setting size to stay the same size with no expiration. Disabled variable for Shared servers xcache.var_size="0" xcache.ttl="0" xcache.gc_interval="0" ; Disable XCache tests xcache.coverager="Off" xcache.test="Off" # Save and restart httpd service httpd restart # Visit XCache admin interface 0 -
While logged into the web interface you can view opcache information. [COLOR="silver">- - - Updated - - - If you are using scripts such as WordPress or Joomla set to utilize XCache you will want to replace xcache.var_size="0" with something along the following: xcache.var_count="1" xcache.var_gc_interval="300" xcache.var_maxttl="0" xcache.var_size="4M" xcache.var_slots="8K" 0 -
Hello :) Have you ensured that you are using a PHP handler that supports Opcode caching (e.g. not suPHP)? Thank you. 0 -
Hi have the same problem. Installed Xcache I'm using FastCGI with suEXEC. WHM 11.48.4. WHM VPS version on CentOS. And this is what I get from php -i: XCache XCache Version => 3.1.0 Modules Built => cacher Directive => Local Value => Master Value xcache.coredump_directory => no value => no value xcache.disable_on_crash => Off => Off xcache.experimental => Off => Off xcache.test => Off => Off XCache Cacher XCache Cacher Module => enabled Readonly Protection => disabled Page Request Time => 2015-05-16 18:14:54 Cache Init Time => 2015-05-16 18:14:54 Cache Instance Id => 3876 Opcode Cache => disabled Variable Cache => enabled, 8,388,608 bytes, 4 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 => 4 => 4 xcache.gc_interval => 0 => 0 xcache.mmap_path => /dev/zero => /dev/zero xcache.readonly_protection => Off => Off xcache.shm_scheme => mmap => mmap xcache.size => 256M => 256M xcache.slots => 8K => 8K xcache.stat => On => On xcache.ttl => 0 => 0 xcache.var_allocator => bestfit => bestfit xcache.var_count => 4 => 4 xcache.var_gc_interval => 300 => 300 xcache.var_maxttl => 0 => 0 xcache.var_namespace => no value => no value xcache.var_namespace_mode => 0 => 0 xcache.var_size => 8M => 8M xcache.var_slots => 8K => 8K xcache.var_ttl => 0 => 0 --------- php -v PHP 5.4.40 (cli) (built: May 16 2015 13:10:50) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with XCache v3.1.0, Copyright (c) 2005-2013, by mOo with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd. with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo with Suhosin v0.9.36, Copyright (c) 2007-2014, by SektionEins GmbH --------
I prefer to install from Easyapache, but I don't know why opcode cache is disabled. Thanks in advance.0 -
Hello, Were you able to review the previous posts to this thread, and if so, were they not helpful? Thank you. 0
Please sign in to leave a comment.
Comments
5 comments