logo
Published on Technical articles on: Windows servers, Apache Web Server, MySQL, PHP, IIS (http://www.sitebuddy.com)

Xcache a new PHP accelerator ? (updated version 1.0.2)

By chris
Created 16 Aug 2006 - 11:43am

It looks like the author of Xcache grew frustrated with the current offering of PHP accelerators and decided to build a simple stable PHP accelerator. For example, eAccelerator works perfectly on multiple servers here but on others it crashes multiple times a day. I'm still investigating this: eAccelerator crash

Install instructions:

1) Download the appropriate release for your version of PHP at: XCache (as of this writing the current Win32 version is 1.0.1 RC1).

2) Upload php_xcache.dll to your PHP extension folder

3) Enable the extension in your php.ini:
extension = php_xcache.dll
OR
zend_extension_ts = c:/php/extensions/php_xcache.dll ( zend extension )

4) Set a few configuration directives in php.ini:
Updated:
xcache.size = 64M (since version 1.0.2)
xcache.size = 64000 ; it appear this value is in Bytes (version 1.0.1RC1)
; uncomment and set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count = 2 (got 2 processor: with 3 my instance of Apache would not boot)
; just a hash hints, you can always store count(items) > slots
;xcache.slots = (default 8k)

; same as aboves but for variable cache (used only when using API)
xcache.var_size = 0M
xcache.var_count = 1
xcache.var_slots = 8K

xcache.readonly_protection = Off

5) Protect the control panel:
[xcache.admin]
xcache.admin.user = "root"
; xcache.admin.pass = "md5 encoded version of $your_password"
xcache.admin.pass = "098f6bcd4621d373cade4e832627b4f6" ; this value is the equivalent of "test"

If you do not set a user password the control panel is disabled.
You can find the control panel in the source version of Xcache. It in the "Admin" folder. Simply upload that folder to your site (I recommend renaming that folder name).

Note:
required for >=php5.1
auto_globals_jit = Off

I'm now evaluating Xcache 1.0.2 on one of my Win32 Apache server (2.0.59 + PHP 5.1.6).

Example site (as of 09/29/2006) running with xcache (pretty fast): http://www.else.fr/
 


Source URL:
http://www.sitebuddy.com/php/accelerator_xcache