owen
owen

Reputation: 135

How to enable OPCache for PHP7.1 on MAC Sierra (MAMP)

I've installed OPCache GUI from GitHub and installed in my Mac. But when I run the page, it shows

The Zend OPcache extension is installed but not turned on

I've enabled the OPCache in my php.ini file with these

opcache.enable=1
opcache.enable_cli=1
zend_extension=opcache.so
opcache.memory_consumption=128
opcache.max_accelerated_files=2500
opcache.interned_strings_buffer=8
opcache.revalidate_freq=60
opcache.fast_shutdown=1
zend_extension=/path/to/opcache.so/file

Please help!

Upvotes: 7

Views: 7859

Answers (1)

insertusernamehere
insertusernamehere

Reputation: 23600

I found that no matter what you set in php.ini the cache is always shown as disabled. The only way that worked, was to activate OPcache directly in the MAMP GUI.

Where you find these settings depends on the MAMP variant (standard or pro):

MAMP PRO

Language → PHP Settings → Cache module to speed up PHP execution → OPcache

enter image description here

MAMP

Settings → General → Cache → OPcache

enter image description here

Upvotes: 3

Related Questions