XCache module installation error

1.9k views Asked by At

In my PHP 5.4 and Centos 6.3 machine I'm trying to install XCache. From this manual I made every step: http://cgibin.info/php/install-xcache-centos/

Inside /etc/php.ini file I added this, and checked that xcache.so file exists in directory

extension      = /usr/lib64/php/modules/xcache.so

then I wrote php -v I get this:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/20090626/apc.so' - /usr/lib64/20090626/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.4.18 (cli) (built: Aug 19 2013 14:10:14)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with XCache v3.0.3, Copyright (c) 2005-2013, by mOo
    with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.
    with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo

But when I check admin panel I see this: enter image description here

I added XCache entries to /etc/php.ini.
I don't change /var/www/vhosts/system/example.com/etc/php.ini because that file is auto generated by Plesk 11.5

Also when I make phpinfo(), I don't see a XCache part.

After that I added ini directives to /var/www/vhosts/system/example.com/etc/php.ini and it worked. But whenever I update my Plesk settings I will lose the entries inside that file. I don't prefer to use Plesk UI for php.ini settings. Is it not possible to use /etc/php.ini settings rather than writing them to /var/www/vhosts/system/example.com/etc/php.ini

How can I solve this ?

Some part of my php.ini file like this:

Server API  
    CGI/FastCGI
Configuration File (php.ini) Path   
    /etc
Loaded Configuration File   
    /var/www/vhosts/system/example.com/etc/php.ini
Scan this dir for additional .ini files 
    /etc/php.d
Additional .ini files parsed    
    /etc/php.d/apc.ini,         /etc/php.d/curl.ini,        /etc/php.d/dom.ini,         /etc/php.d/fileinfo.ini,        /etc/php.d/gd.ini,      /etc/php.d/imap.ini,        /etc/php.d/ioncube.ini,     /etc/php.d/json.ini,        /etc/php.d/mbstring.ini,        /etc/php.d/mysql.ini,       /etc/php.d/mysqli.ini,      /etc/php.d/newrelic.ini,        /etc/php.d/pdo.ini,         /etc/php.d/pdo_mysql.ini,       /etc/php.d/pdo_sqlite.ini,      /etc/php.d/phar.ini,        /etc/php.d/sqlite3.ini,         /etc/php.d/wddx.ini,        /etc/php.d/xmlreader.ini,       /etc/php.d/xmlwriter.ini,       /etc/php.d/xsl.ini,         /etc/php.d/zend_extensions_psa.ini,         /etc/php.d/zip.ini
2

There are 2 answers

0
Borgboy On

Trante,

Me again. Try adding the xcache.ini to the php.d directory. This may not work for you, as I have read that the xcache extension needs to be loaded before other extensions. However, I have not been able to confirm this as of today. (It is on my test agenda for my recently rolled rpm.)

Anthony

0
ManreeRist On

Make a phpinfo() page.

Check the 'extension_dir' and make sure the xcache.so is in this folder.

If it is in there and still not coming up in phpinfo(), check apache error logs, this should tell you if it has trouble loading the extension and what error occurred along the way.

IMO Your better off compiling this from source, it'll be easier to do and you can have direct control over everything.