Page 1 of 1

PHP Caching ?

Posted: Thu Mar 01, 2018 8:36 am
by jodumont

I just install VestaCP (again) on CentOS (I specify because it might not the case on other OS)
I just realise, at least after an update to PHP7

PHP have no cache module like : opcache, apc, apcu, memcache or memcached.

My 1st question is why ?
My 2nd question is why not ?

Why It have no cache; Caching is very benefic for drupal, wordpress and others php apps which VestaCP propose WebTemplates.
I'm not talking about Redis or memcached which better to have a 3rd parties server for them but simply stuff like opcache and or apc/apcu which already increase performance for at least wordpress, nextcloud and drupal.

So I wonder Why not including opcache and apcu in VestaCP deployment ?

Thank and o plaisir to read you about this :)

Re: PHP Caching ?

Posted: Thu Mar 01, 2018 11:34 am
by mehargags
What version of PHP 7 did you install ? 7.1 or 7.2 ?

Also OPcache is intgrated into PHP7 and should be enabled, however if not then you can enable it in your Php.ini

here is a good discussion to follow. ... he-on-php7

Re: PHP Caching ?

Posted: Tue Apr 10, 2018 9:35 am
by jodumont
I have PHP 7.2.4 on CentOS

I don't think opCache is by default because
opcache-status and/or opcache-gui say : You do not have the Zend OPcache extension loaded
also opcache is not there when I do a

Code: Select all

php -m
and so even after an install

Code: Select all

yum install php72-php-opcache
systemctl restart php-fpm nginx
I also followed this tuto which it's ending with :
PHP 7.2.1 (cli) (built: Jan 3 2018 07:51:38) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.1, Copyright (c) 1999-2017, by Zend Technologies
but I still without ZendOPcache
php -v
PHP 7.2.4 (cli) (built: Mar 27 2018 17:23:35) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

I wonder if it's because VestaCP use ioCube ?

Re: PHP Caching ?

Posted: Tue Apr 10, 2018 1:52 pm
by sandy
simple easy installation guide for installaing opcache, APC/APCu, memcached and redis under centos : ... cp-centos/