• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Install and enable xcache for PHP 5.5 and 5.6

NickBucko

New Pleskian
I've found instructions on how to install memcached for PHP 5.5 and 5.6 on Plesk 12.5 but I need xcache installed for these versions of PHP. I haven't been able to find instructions on how to accomplish this.
 
For php versions 5.5+ we use opcache instead of xcache.
For older versions you can install it:

# yum search xcache
.........
plesk-php52-xcache.i686 : Fast, stable PHP opcode cacher
plesk-php53-xcache.i686 : Fast, stable PHP opcode cacher
plesk-php54-xcache.i686 : Fast, stable PHP opcode cacher
 
Igor -

I understand that opcache is used. However, is it possible to use xcache and if so, how do I install and enable that?
 
Well. Here is step-by-step instruction:

# yum groupinstall 'Development Tools'
# yum install plesk-php56-devel
# wget https://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz
# tar xvfz xcache-3.2.0.tar.gz
# cd xcache-3.2.0/
# /opt/plesk/php/5.6/bin/phpize
# ./configure --enable-xcache --with-php-config=/opt/plesk/php/5.6/bin/php-config
# make
# make install
# echo "extension=xcache.so" > /opt/plesk/php/5.6/etc/php.d/xcache.ini
# plesk bin php_handler --reread

# /opt/plesk/php/5.6/bin/php -v
PHP 5.6.30 (cli) (built: Mar 14 2017 19:21:14)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.7, Copyright (c) 2002-2016, by ionCube Ltd.
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo

Voilà!
 
Hi I have been trying to figure things out myself but its got to a point where I need people who know what they are doing lol.

I have Plesk Onyx 17.5.3 and I have multiple PHP versions installed.

Code:
{"php":[
{
        "id":"plesk-php71-fpm",
        "path":"/opt/plesk/php/7.1/sbin/php-fpm",
        "clipath":"/opt/plesk/php/7.1/bin/php",
        "phpini":"/opt/plesk/php/7.1/etc/php.ini",
        "version":"7.1.7",
        "displayname":"7.1.7",
        "type":"fpm",
        "system":true,
        "service":"plesk-php71-fpm",
        "poold":"/opt/plesk/php/7.1/etc/php-fpm.d"
},
{
        "id":"fastcgi",
        "path":"/usr/bin/php-cgi",
        "clipath":"/usr/bin/php",
        "phpini":"/etc/php.ini",
        "version":"5.3.3",
        "displayname":"5.3.3",
        "type":"fastcgi",
        "system":true
},
{
        "id":"plesk-php70-cgi",
        "path":"/opt/plesk/php/7.0/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.0/bin/php",
        "phpini":"/opt/plesk/php/7.0/etc/php.ini",
        "version":"7.0.21",
        "displayname":"7.0.21",
        "type":"cgi",
        "system":true
},
{
        "id":"plesk-php70-fpm",
        "path":"/opt/plesk/php/7.0/sbin/php-fpm",
        "clipath":"/opt/plesk/php/7.0/bin/php",
        "phpini":"/opt/plesk/php/7.0/etc/php.ini",
        "version":"7.0.21",
        "displayname":"7.0.21",
        "type":"fpm",
        "system":true,
        "service":"plesk-php70-fpm",
        "poold":"/opt/plesk/php/7.0/etc/php-fpm.d"
},
{
        "id":"plesk-php71-fastcgi",
        "path":"/opt/plesk/php/7.1/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.1/bin/php",
        "phpini":"/opt/plesk/php/7.1/etc/php.ini",
        "version":"7.1.7",
        "displayname":"7.1.7",
        "type":"fastcgi",
        "system":true
},
{
        "id":"plesk-php70-fastcgi",
        "path":"/opt/plesk/php/7.0/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.0/bin/php",
        "phpini":"/opt/plesk/php/7.0/etc/php.ini",
        "version":"7.0.21",
        "displayname":"7.0.21",
        "type":"fastcgi",
        "system":true
},
{
        "id":"cgi",
        "path":"/usr/bin/php-cgi",
        "clipath":"/usr/bin/php",
        "phpini":"/etc/php.ini",
        "version":"5.3.3",
        "displayname":"5.3.3",
        "type":"cgi",
        "system":true
},
{
        "id":"plesk-php56-fastcgi",
        "path":"/opt/plesk/php/5.6/bin/php-cgi",
        "clipath":"/opt/plesk/php/5.6/bin/php",
        "phpini":"/opt/plesk/php/5.6/etc/php.ini",
        "version":"5.6.31",
        "displayname":"5.6.31",
        "type":"fastcgi",
        "system":true
},
{
        "id":"plesk-php71-cgi",
        "path":"/opt/plesk/php/7.1/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.1/bin/php",
        "phpini":"/opt/plesk/php/7.1/etc/php.ini",
        "version":"7.1.7",
        "displayname":"7.1.7",
        "type":"cgi",
        "system":true
},
{
        "id":"plesk-php56-cgi",
        "path":"/opt/plesk/php/5.6/bin/php-cgi",
        "clipath":"/opt/plesk/php/5.6/bin/php",
        "phpini":"/opt/plesk/php/5.6/etc/php.ini",
        "version":"5.6.31",
        "displayname":"5.6.31",
        "type":"cgi",
        "system":true
},
{
        "id":"module",
        "path":"/usr/bin/php-cgi",
        "clipath":"/usr/bin/php",
        "phpini":"/etc/php.ini",
        "version":"5.3.3",
        "displayname":"5.3.3",
        "type":"module",
        "system":true
},
{
        "id":"plesk-php56-fpm",
        "path":"/opt/plesk/php/5.6/sbin/php-fpm",
        "clipath":"/opt/plesk/php/5.6/bin/php",
        "phpini":"/opt/plesk/php/5.6/etc/php.ini",
        "version":"5.6.31",
        "displayname":"5.6.31",
        "type":"fpm",
        "system":true,
        "service":"plesk-php56-fpm",
        "poold":"/opt/plesk/php/5.6/etc/php-fpm.d"
}
]}

php -v gives me

Code:
PHP 5.3.3 (cli) (built: Mar 22 2017 12:27:09)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.
    with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo

and /opt/plesk/php/5.6/bin/php -v give me

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib64/php/modules/xcache.so' - /opt/plesk/php/5.6/lib64/php/modules/xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib64/php/modules/xcache.so' - /opt/plesk/php/5.6/lib64/php/modules/xcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.6.31 (cli) (built: Jul  7 2017 10:54:32)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.7, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

im using vBulletin and I want to upgrade to 4.2.4 from 4.2.3PL 1 but it requires php 5.5+ and I use xcache on it so when I switch to PHP 5.6.31 it does not load due to it not having xcache but its installed on the server, How can I fix this.

thank you.
 
Please use this instruction for getting Xcache for PHP 5.6 - #4

I did that and I got an error saying that

Code:
[root@server xcache-3.2.0]# /opt/plesk/php/5.6/bin/phpize
-bash: /opt/plesk/php/5.6/bin/phpize: No such file or directory
[root@server xcache-3.2.0]# ./configure --enable-xcache --with-php-config=/opt/plesk/php/5.6/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH
[root@server xcache-3.2.0]#
 
Hi DC2017,

[root@server xcache-3.2.0]# /opt/plesk/php/5.6/bin/phpize
-bash: /opt/plesk/php/5.6/bin/phpize: No such file or directory
and
configure: error: Cannot find php-config. Please use --with-php-config=PATH
... point to the fact, that you missed to install the corresponding "dev" - PHP - packages. For CentOS, @IgorG already pointed out:
yum install plesk-php56-devel
... while on Debian/Ubuntu - based systems, this command would be for example:
Code:
aptitude install plesk-php56-dev
 
Hi DC2017,


and

... point to the fact, that you missed to install the corresponding "dev" - PHP - packages. For CentOS, @IgorG already pointed out:

... while on Debian/Ubuntu - based systems, this command would be for example:
Code:
aptitude install plesk-php56-dev

will this effect my other php installs as I have a live site running and do not want to mess it up.
 
Hi DC2017,

will this effect my other php installs as I have a live site running and do not want to mess it up.
Certainly not, as the additional "dev" - package will not interfere with your PHP - version. But without this package, you miss necessary files, which are needed if you would like to add additional PHP - modules. ;)
 
Hi DC2017,


Certainly not, as the additional "dev" - package will not interfere with your PHP - version. But without this package, you miss necessary files, which are needed if you would like to add additional PHP - modules. ;)

that worked a treat... is it the same to add it to PHP 7.1 ?

also getting this error

Code:
[crit] 26136#0: *1215705 connect() to unix:///var/www/vhosts/system/domain.com/php-fpm.sock failed (2: No such file or directory) while connecting to upstream

you wouldn't happen to know why ?
 
Hi DC2017,

pls. try NOT to mix threads with different issues/errors/problems, as it might irritate other forum users, when they try to find questions and answers.

If you didn't already found an answer to your question after using the powerfull FORUM SEARCH ( => Search | Plesk Forum ) , pls. open a NEW thread with your issue/error/problem. ;)
 
Back
Top