PHP OPcache is not properly configured - Mint Linux

Hello,

I have installed next cloud on Intel Nuc on Mint Linux. I have installed php7 and my SQL. I have edited the php.ini however below error is not going at all.

The PHP OPcache is not properly configured. For better performance it is recommended to use the 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

can you suggest which file I need to edit so that these warning will go away.

Thanks for your help and support.

Type php --ini and you’ll see additional ini files. Latter may overwrite first ones.

Which webserver are you using?

I am using Apache2 as webserver.

I have these settings in /etc/php/7.0/mods-available/opcache.ini:

zend_extension=opcache.so
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

and opcache works fine.

2 Likes

Some other systems could go as;

/etc/php/apache2/php.ini

Cheers!

Jep putting them into mods-available/opcache.ini has the advantage, that they are activated for all PHP connectors automatically together with the module. I am not sure if opcache.enable_cli=1 etc even has any effect if it is set just within apache2/php.ini.

Yeah indeed.