Tag-Archive for » ZendOptimizer «

Friday, October 17th, 2008 | Author: Angelo

What is Xcache ? :: Xcache help to accelerates the performance of PHP on servers. It optimizes performance by excluding compilation time of PHP scripts by caching the compiled state of PHP scripts into the RAM and uses the compiled version directly from the RAM. Which help to increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and help to reduce serverload.

Installing Xache module:

XCache is a fast, stable PHP opcode cacher that has been tested on linux server and running under high load.
XCache 1.2.1 is release is compatible with apache1/ZendOptimizer/ZendCore compatibility. This version support only support 4.3.x 4.4.x 5.1.x and 5.2.x but does not support the PHP 5.0.x series, also note Xcache is not compatible with IONCUBE.

Installation:
[root@linuxserver ~]# wget http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-1.2.1.tar.gz
[root@linuxserver ~]# tar -xzf xcache-1.2.1.tar.gz
[root@linuxserver ~]# cd xcache-1.2.1
[root@linuxserver ~]# phpize
[root@linuxserver ~]# ./configure –enable-xcache –enable-xcache-optimizer
[root@linuxserver ~]# make
[root@linuxserver ~]# make install

Adding extensions and configuring xcache in php.ini you can find location of php.ini file by following command
[root@linuxserver ~]# php -i | grep php.ini
Now edit php.ini file.
Under ? extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613" line add following parameter to enable xcache.

extension = xcache.so

[xcache.admin]
; Change xcache.admin.user to your preferred login name
xcache.admin.user = "admin" ? no need to add system user.

; Change xcache.admin.pass to the MD5 fingerprint of your password
; Use md5 -s "your_secret_password" to find the fingerprint
xcache.admin.pass = "cd959ac3debe8f587546a3fa353b3268" ? Password in MD5(op3nsesam3)

[xcache]
; Change xcache.size to tune the size of the opcode cache
xcache.size = 128M
xcache.shm_scheme = "mmap"
xcache.count = 2
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

; Change xcache.var_size to adjust the size of variable cache
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
xcache.mmap_path = "/tmp/xcache"
xcache.coredump_directory = ""
xcache.cacher = On
xcache.stat = On
xcache.optimizer = On

[xcache.coverager]
xcache.coverager = On
xcache.coveragedump_directory = ""

save and quit.

Restart httpd service.

Now from xcache source copy the "admin" directory to your htdocs from where you can manage the xache.
http://server-ip/admin/