I tried to enable OPCache for Drupal 8.0.4 in WAMP 3 but it isn't working. So I googled and changed a few things in my php.ini file and here is what I changed:
opcache.enable=0
to
opcache.enable=1
and also
opcache.enable_cli=0
to
opcache.enable_cli=1
But still, the '!' mark appears near the PHP Extension. When I try to get the log it says :
Sorry,
The 'php_opcache' extension cannot be loaded by 'extension=php_opcache.dll' in php.ini. Must be loaded by 'zend_extension='.
Switch cancelled
Press ENTER to continue...
But in the PHP.ini file it says:
zend_extension ="C:/wamp/bin/php/php7.0.0/ext/php_opcache.dll"
What else should I do to enable OPCache?
OPcache can only be compiled as a shared extension. If you have disabled the building of default extensions with --disable-all, you must compile PHP with the --enable-opcache option for OPcache to be available. Once compiled, you can use the zend_extension configuration directive to load the OPcache extension into PHP.
The entire purpose of PHP's opcache is to speed up your scripts and save CPU by storing compiled PHP scripts in memory. If you'd rather have slower apps and increased CPU usage to save memory, you can disable the opcache.
Go to PHP configuration / php.ini file and add these two lines end of the page
zend_extension=php_opcache.dll
; Determines if Zend OPCache is enabled
opcache.enable=1
You can also increase the max execution time on php.ini configuration file.
max_execution_time=180
Hope it helps.
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