Reputation: 17181
I am finding it tricky to enable OPcache on my MacOS Sierra (10.12.6) system.
php --ini
shows the ini file used:
Configuration File (php.ini) Path: /usr/local/etc/php/7.0
Loaded Configuration File: /usr/local/etc/php/7.0/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.0/conf.d/ext-pdo_pgsql.ini
My php.ini
looks like this:
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
However, when I look at phpinfo()
it shows the following:
I've restarted Apache after making the change to my php.ini
to include opcache, but it doesn't appear to be recognised.
I installed PHP with Homebrew, not MAMP although I do have MAMP install but unused.
Upvotes: 2
Views: 1835
Reputation: 17181
I got to the bottom of this eventually...
In the output from phpinfo()
, have a look at the .ini files listed under:
Additional .ini files parsed
There may be something like
/usr/local/php5/php.d/20-extension-opcache.ini
Make sure opcache.enable=1
is set in this file.
Upvotes: 1