I want to enable PHP OPcode caching for Drupal 8 installation. I have the following in Xampp php.ini. However, I still get opcode not enabled. What am I doing wrong??
opcache.enable=1
engine = On
zend_extension=php_opcache.dll
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
Enabling opcode caching In the SOFTWARE section of the cPanel home screen, click Select PHP Version. Select the check box next to the opcode caching extension you want to enable: If you are using PHP version 5.4 or older, select apc. If you are using PHP version 5.5 or newer, select opcache.
OPcache is a type of caching system that saves precompiled script bytecode in a server's memory called a cache, so each time a user visits a web page, it loads faster.
An OPCode is the numeric identifier of a single operation that can be performed by the Zend Virtual Machine (Zend VM). After PHP has scanned the human-readable source code and chunked it into tokens, these tokens are grouped together in the parsing phase.
Here is nice post about OPCache: How to use PHP OPCache?
And here is for localhost with XAMPP: https://www.drupal.org/node/2623566
First of all check your PHP version. Before and after PHP 5.5 things are little bit different. You may refer for difference here http://php.net/manual/en/opcache.installation.php
Also if you are using zend extension then full path of dll is required in below
zend_extension=/your/path/tod/dll/php_opcache.dll
Also make sure to use correct one in terms of threaded or non threaded version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With