PHP Opcache not correctly

Hello everyone Finally I found a solution and for me All checks passed.

First, find the location of opcache.so:
$ sudo find / -name ‘opcache.so
/usr/lib/php/20151012/opcache.so # On my server with php 7.0

Once you have the location, you can add that to the conf file for opcache:
$ sudo nano /etc/php/7.0/mods-available/opcache.ini # On my server with php 7.0

Add the following to opcache.ini

zend_extension=/usr/lib/php/20151012/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

Save the file and then you can exit.
$ sudo systemctl restart apache2.service

3 Likes