Troubleshoot - by Hostrare
XCache is a quick, stable PHP opcode cacher that has been tested and is now working on increasing servers under high load. It is tested (on Linux) and maintained on all of the latest PHP statement categories such as PHP_5_1 PHP_5_2 PHP_5_3 PHP_5_4. ThreadSafe/Windows is also perfectly supported. It succeeds a lot of queries that have been with other competing opcachers such as being ready to be used with new PHP reports.
Download Latest Stable xcache Release
tar -zxvf xcache-3.0.3.tar.gz
Use phpize command to prepare xcache as a PHP extension for compiling, if you dont know where is phpize, use find -name phpize.
Configure, compile and install xcache
You will received the following extension directory details.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
open php.ini and add xcache.so entries.
restart apache webserver.
Thats all!! you can verify that xcache modules in your php.
root@server [/]# php -vPHP 5.3.25 (cli) (built: Jul 9 2013 23:42:49)Copyright (c) 1997-2013 The PHP GroupZend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologieswith XCache v3.0.3, Copyright (c) 2005-2013, by mOowith the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., andwith XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOowith Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
If you still need to optimize the xcache and configure admin settings then use the following settings in your php.ini file.
[xcache.admin]xcache.admin.user = "admin";how to create md5 pwd: echo -n "password"| md5sumxcache.admin.pass = "5f4dcc3b5aa765d61d8327deb882cf99"[xcache]; Change xcache.size to tune the size of the opcode cache; to disable: xcache.size=0; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows; someone said, if >=64 will get problemxcache.size = 32Mxcache.shm_scheme = "mmap"; set to cpu count (cat /proc/cpuinfo |grep -c processor)xcache.count = 4; just a hash hints, you can always store count(items) > slotsxcache.slots = 8K; ttl of the cache item, 0=foreverxcache.ttl = 0; interval of gc scanning expired items, 0=no scan, other values is in secondsxcache.gc_interval = 0; Change xcache.var_size to adjust the size of variable cache; same as aboves but for variable cache, if you have not used xcache function in script,forget itxcache.var_size = 8Mxcache.var_count = 1xcache.var_slots = 8Kxcache.var_ttl = 0xcache.var_maxttl = 0xcache.var_gc_interval = 300xcache.test = Offxcache.readonly_protection = On; for *nix, xcache.mmap_path is a file path, not directory.; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection; 2 group of php won’t share the same /tmp/xcache; for win32, xcache.mmap_path=anonymous map name, not file pathxcache.mmap_path = "/tmp/xcache"; leave it blank(disabled) or "/tmp/phpcore/"; make sure it’s writable by php (without checking open_basedir)xcache.coredump_directory = ""; per request settingsxcache.cacher = Onxcache.stat = Onxcache.optimizer = Off[xcache.coverager]; per request settings; enable coverage data collecting for xcache.coveragedump_directory and; xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)xcache.coverager = On; ini only settings; make sure it’s readable (care open_basedir) by coverage viewer script; requires xcache.coverager=Onxcache.coveragedump_directory = ""
Whether you are looking for a personal website hosting plan or a business website hosting plan, We are the perfect solution for you. Our powerful website hosting services will not only help you achieve your overall website goals, but will also provide you with the confidence you need in knowing that you are partnered with a reliable and secure website hosting platform.
Any hosting service you require, you can avail 50% Discount with new verified account. Chat with your Team Now