[SOLVED] Opcache on debian jessie

Nextcloud 12.0.3

The PHP OPcache is not properly configured. For better performance we recommend to use following settings in the php.ini:
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

I entered these values in
/etc/php5/apache2/php.ini
/etc/php5/cgi/php.ini
/etc/php5/cli/php.ini
and restarted apache2 but I still get the message.

Debian jessie, php 5.6.30, apache 2.4.10.

Edit: solution
write the above instruction in /etc/php5/mods-available/opcache.ini, then service apache2 reload.

It should be also possible to add them to /etc/php5/mods-available/opcache.ini from where they will be included into php config if the module is active.

Check if the module is active by “php -m” and look for opcache in the list. Otherwise “php5enmod opcache”.

I can’t find anything about opcache :-/

php -m | grep opcache

aptitude search opcache

ls -l | grep cache
-rw-r--r-- 1 root root   78 ago  7  2015 authn_socache.load
-rw-r--r-- 1 root root  889 ago  7  2015 cache_disk.conf
-rw-r--r-- 1 root root   89 ago  7  2015 cache_disk.load
-rw-r--r-- 1 root root   62 ago  2  2015 cache.load
-rw-r--r-- 1 root root   95 ago  7  2015 cache_socache.load
-rw-r--r-- 1 root root   89 ago  2  2015 file_cache.load
-rw-r--r-- 1 root root   74 ago  7  2015 socache_dbm.load
-rw-r--r-- 1 root root   84 ago  7  2015 socache_memcache.load
-rw-r--r-- 1 root root   78 ago  7  2015 socache_shmcb.load

Hmm the opcache module should be packed together with php5 (libapache2-mod-php5), so you will not find it in aptitute/apt repo.

Your ls -l looks like from apache mods folder (/etc/apache2/mods-available/), but opcache is a php module, so you should find it in /etc/php5/mods-available/opcache.ini which should be symlinked into php apache config (included in php.ini) automatically by using enable command:

php5enmod opcache

It looks like opcache was already enabled:

ls -l /etc/php5/apache2/conf.d/ | grep cache
lrwxrwxrwx 1 root root 32 dic  2  2015 05-opcache.ini -> ../../mods-available/opcache.ini

Okay and even if you add

opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

to /etc/php5/mods-available/opcache.ini the message appears?

Could you check phpinfo() output which opcache values are shown there?
nano /path/to/nextcloud/phpinfo.php

<?php phpinfo(); ?>

And open this in browser.

Yeah, it works now! I’ve been writing the setting in the wrong place.
Thank you very much MichaIng for your help!!!