虽然有 3.0.0版本,但xcache.so 加载方式不同了,按上面方法就会出问题:
提示:xcache.so doesn't appear to be a valid Zend extension 这样的错误
有时还出现这样的错误:PHP Warning: PHP Startup: XCache: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
最后把中间的路径换成 extension = xcache.so 就可以了,php -v显示如下:
3.0版在PHP 5.2、5.3、5.4下都可用,在 3.0下显示的信息,多了几行XCache了)
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v3.0.0-dev, Copyright (c) 2005-2012, by mOo
with XCache Optimizer v3.0.0-dev, Copyright (c) 2005-2012, by mOo
with XCache Cacher v3.0.0-dev, Copyright (c) 2005-2012, by mOo
XCache requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact mOo at http://xcache.lighttpd.net for a later version of XCache.
出这样的错误提示时,安装方法要变换一下,如:
cd xcache-2.0.1;phpize;mkdir ../xcache-build;cd ../xcache-build../xcache-2.0.1/configure --with-php-config=/usr/local/php/bin/php-config
XCache requires Zend Engine API version 220060519.
The Zend Engine API version 220090626 which is installed, is newer.
Contact mOo at http://xcache.lighttpd.net for a later version of XCache.
6、XCache 与 eAccelerator 、APC不能同时共存,提示错误:
PHP Warning: Cannot load module 'XCache' because conflicting module
'eAccelerator' is already loaded in Unknown on line 0 Segmentation fault
如不想使用Xcache 或 eA ,只需把 php.ini 下面添加的删除,再重启PHP即可。