Troubleshoot - by Hostrare
XCache is a quick, stable PHP opcode cacher that has been inquired and is now working on production servers under huge load. It is examined (on Linux) and carried on all of the most advanced PHP release parts such as PHP_5_1 PHP_5_2 PHP_5_3 PHP_5_4. ThreadSafe/Windows is also perfectly supported. It overcomes a lot of problems that have been with other racing opcachers such as being able to be used with new PHP accounts.
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.
[email protected] [/]# php -v PHP 5.3.25 (cli) (built: Jul 9 2013 23:42:49) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies with XCache v3.0.3, Copyright (c) 2005-2013, by mOo with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., and with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo with 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"| md5sum xcache.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 problem xcache.size = 32M xcache.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) > slots xcache.slots = 8K ; ttl of the cache item, 0=forever xcache.ttl = 0 ; interval of gc scanning expired items, 0=no scan, other values is in seconds xcache.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 it xcache.var_size = 8M xcache.var_count = 1 xcache.var_slots = 8K xcache.var_ttl = 0 xcache.var_maxttl = 0 xcache.var_gc_interval = 300 xcache.test = Off xcache.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 path xcache.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 settings xcache.cacher = On xcache.stat = On xcache.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=On xcache.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