Hello Man
Hello Man

Reputation: 701

Enable OPCache not working in WAMP

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?

Upvotes: 9

Views: 6474

Answers (1)

Jack
Jack

Reputation: 520

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.

Upvotes: 5

Related Questions